Add pkg-config file for orc-test library
authorTim-Philipp Müller <tim@centricular.com>
Tue, 5 Mar 2019 11:05:43 +0000 (11:05 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 5 Mar 2019 11:05:43 +0000 (11:05 +0000)
Fixes #16

Makefile.am
configure.ac
meson.build
orc-test-uninstalled.pc.in [new file with mode: 0644]
orc-test.pc.in [new file with mode: 0644]
orc-test/meson.build

index ede9987..167046d 100644 (file)
@@ -20,7 +20,7 @@ EXTRA_DIST = COPYING RELEASE autogen.sh gtk-doc.make orc.m4 \
 
 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
 
-pkgconfig_DATA = orc-$(ORC_MAJORMINOR).pc
+pkgconfig_DATA = orc-$(ORC_MAJORMINOR).pc orc-test-$(ORC_MAJORMINOR).pc
 
 cp_v_gen = $(cp_v_gen_$(V))
 cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
@@ -29,12 +29,20 @@ cp_v_gen_0 = @echo "  CP     $@";
 orc-$(ORC_MAJORMINOR).pc: orc.pc
        $(cp_v_gen)cp orc.pc orc-$(ORC_MAJORMINOR).pc
 
+orc-test-$(ORC_MAJORMINOR).pc: orc-test.pc
+       $(cp_v_gen)cp orc-test.pc orc-test-$(ORC_MAJORMINOR).pc
+
 orc-$(ORC_MAJORMINOR)-uninstalled.pc: orc-uninstalled.pc
        $(cp_v_gen)cp orc-uninstalled.pc orc-$(ORC_MAJORMINOR)-uninstalled.pc
 
-BUILT_SOURCES=orc-$(ORC_MAJORMINOR)-uninstalled.pc
+orc-test-$(ORC_MAJORMINOR)-uninstalled.pc: orc-test-uninstalled.pc
+       $(cp_v_gen)cp orc-test-uninstalled.pc orc-test-$(ORC_MAJORMINOR)-uninstalled.pc
+
+BUILT_SOURCES=orc-$(ORC_MAJORMINOR)-uninstalled.pc \
+       orc-test-$(ORC_MAJORMINOR)-uninstalled.pc
 
-CLEANFILES = orc-$(ORC_MAJORMINOR).pc orc-$(ORC_MAJORMINOR)-uninstalled.pc
+CLEANFILES = orc-$(ORC_MAJORMINOR).pc orc-$(ORC_MAJORMINOR)-uninstalled.pc \
+       orc-test-$(ORC_MAJORMINOR).pc orc-test-$(ORC_MAJORMINOR)-uninstalled.pc
 
 ACLOCAL_AMFLAGS = -I m4
 
index 7782890..4017cdf 100644 (file)
@@ -271,6 +271,8 @@ examples/Makefile
 tools/Makefile
 orc-uninstalled.pc
 orc.pc
+orc-test.pc
+orc-test-uninstalled.pc
 ])
 AC_OUTPUT
 
index 467e045..815d896 100644 (file)
@@ -166,6 +166,7 @@ else
   endif
 endif
 
+# FIXME: use pkg-config module
 pc_conf.set('prefix', get_option('prefix'))
 pc_conf.set('exec_prefix', get_option('prefix'))
 pc_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
diff --git a/orc-test-uninstalled.pc.in b/orc-test-uninstalled.pc.in
new file mode 100644 (file)
index 0000000..6c1c649
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=
+exec_prefix=
+libdir=${pcfiledir}/orc-test/.libs
+includedir=${pcfiledir}/
+
+Name: orc-@ORC_MAJORMINOR@ uninstalled
+Description: Test Library of Optimized Inner Loops Runtime Compiler
+Version: @VERSION@
+Requires: orc-@ORC_MAJORMINOR@
+Libs: -L${libdir} -lorc-test-@ORC_MAJORMINOR@ @LIBM@ @LIBRT@
+Cflags: -I${includedir}
diff --git a/orc-test.pc.in b/orc-test.pc.in
new file mode 100644 (file)
index 0000000..1c79767
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/orc-@ORC_MAJORMINOR@
+
+Name: orc-test-@ORC_MAJORMINOR@
+Description: Test Library of Optimized Inner Loops Runtime Compiler
+Version: @VERSION@
+Requires: orc-@ORC_MAJORMINOR@
+Libs: -L${libdir} -lorc-test-@ORC_MAJORMINOR@
+Libs.private: @LIBM@ @LIBRT@ @PTHREAD_LIBS@
+Cflags: -I${includedir}
index 5c13483..69f90d8 100644 (file)
@@ -26,5 +26,14 @@ else
   orc_test_lib = orc_test_shr
 endif
 
+# pkg-config file
+pkg = import('pkgconfig')
+pkg.generate(orc_test_lib,
+  name: 'orc-test',
+  filebase: 'orc-test-' + orc_api,
+  subdirs: 'orc-' + orc_api,
+  description: 'Test Library of Optimized Inner Loops Runtime Compiler',
+  libraries: [libm, orc_dep])
+
 orc_test_dep = declare_dependency(include_directories : orc_inc,
   link_with : orc_test_lib)