aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--serd.pc.in4
-rw-r--r--wscript9
2 files changed, 10 insertions, 3 deletions
diff --git a/serd.pc.in b/serd.pc.in
index c6006255..c611e692 100644
--- a/serd.pc.in
+++ b/serd.pc.in
@@ -6,5 +6,5 @@ includedir=@includedir@
Name: Serd
Version: @SERD_VERSION@
Description: Lightweight RDF syntax library
-Libs: -L${libdir} -lserd-@SERD_MAJOR_VERSION@
-Cflags: -I${includedir}/serd-@SERD_MAJOR_VERSION@
+Libs: @SERD_LIBS@
+Cflags: @SERD_CFLAGS@
diff --git a/wscript b/wscript
index 41a68dc3..fc8b93da 100644
--- a/wscript
+++ b/wscript
@@ -53,6 +53,11 @@ def configure(conf):
autowaf.define(conf, 'SERD_VERSION', SERD_VERSION)
conf.write_config_header('serd-config.h', remove=False)
+ conf.env['SERD_CFLAGS'] = '-I%s/serd-%s' % (
+ conf.env['INCLUDEDIR'], SERD_MAJOR_VERSION);
+ conf.env['SERD_LIBS'] = '-L%s -lserd-%s' % (
+ conf.env['LIBDIR'], SERD_MAJOR_VERSION);
+
autowaf.display_msg(conf, "Utilities", str(conf.env['BUILD_UTILS']))
autowaf.display_msg(conf, "Unit tests", str(conf.env['BUILD_TESTS']))
print('')
@@ -64,7 +69,9 @@ def build(bld):
# Pkgconfig file
autowaf.build_pc(bld, 'SERD', SERD_VERSION, SERD_MAJOR_VERSION, [],
- {'SERD_MAJOR_VERSION' : SERD_MAJOR_VERSION})
+ {'SERD_CFLAGS' : bld.env['SERD_CFLAGS'],
+ 'SERD_LIBS' : bld.env['SERD_LIBS'],
+ 'SERD_MAJOR_VERSION' : SERD_MAJOR_VERSION})
lib_source = '''
src/env.c