summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-24 19:06:58 +0100
committerDavid Robillard <d@drobilla.net>2020-12-24 19:06:58 +0100
commitc05ab9add46d84e39bea5ee59258564ba35a9582 (patch)
treecfde5cb07be7397dd4f2199b273115d2946ed36c /wscript
parent11f9eb373f9d29101fbc5e6012c86de462b7b267 (diff)
downloadsord-c05ab9add46d84e39bea5ee59258564ba35a9582.tar.gz
sord-c05ab9add46d84e39bea5ee59258564ba35a9582.tar.bz2
sord-c05ab9add46d84e39bea5ee59258564ba35a9582.zip
Fix build as a subproject
Diffstat (limited to 'wscript')
-rw-r--r--wscript22
1 files changed, 12 insertions, 10 deletions
diff --git a/wscript b/wscript
index a1a15a7..b7507cd 100644
--- a/wscript
+++ b/wscript
@@ -147,7 +147,9 @@ def configure(conf):
conf.define('SORD_DEBUG_WRITE', 1)
# Set up environment for building/using as a subproject
- autowaf.set_lib_env(conf, 'sord', SORD_VERSION)
+ autowaf.set_lib_env(conf, 'sord', SORD_VERSION,
+ include_path=str(conf.path.find_node('include')))
+
if conf.env.BUILD_UTILS and conf.env.HAVE_PCRE:
sord_validate_node = conf.path.get_bld().make_node('sord_validate')
conf.env.SORD_VALIDATE = [sord_validate_node.abspath()]
@@ -187,8 +189,8 @@ def build(bld):
if bld.env.BUILD_SHARED:
obj = bld(features = 'c cshlib',
source = source,
- includes = ['include', './src'],
- export_includes = ['include'],
+ includes = ['.', 'include', './src'],
+ export_includes = ['.', 'include'],
name = 'libsord',
target = 'sord-%s' % SORD_MAJOR_VERSION,
vnum = SORD_VERSION,
@@ -202,8 +204,8 @@ def build(bld):
if bld.env.BUILD_STATIC:
obj = bld(features = 'c cstlib',
source = source,
- includes = ['include', './src'],
- export_includes = ['include'],
+ includes = ['.', 'include', './src'],
+ export_includes = ['.', 'include'],
name = 'libsord_static',
target = 'sord-%s' % SORD_MAJOR_VERSION,
vnum = SORD_VERSION,
@@ -223,7 +225,7 @@ def build(bld):
# Profiled static library for test coverage
obj = bld(features = 'c cstlib',
source = source,
- includes = ['include', './src'],
+ includes = ['.', 'include', './src'],
name = 'libsord_profiled',
target = 'sord_profiled',
install_path = '',
@@ -236,7 +238,7 @@ def build(bld):
# Unit test program
obj = bld(features = 'c cprogram',
source = 'src/sord_test.c',
- includes = ['include', './src'],
+ includes = ['.', 'include', './src'],
use = 'libsord_profiled',
lib = test_libs,
target = 'sord_test',
@@ -249,7 +251,7 @@ def build(bld):
# Static profiled sordi for tests
obj = bld(features = 'c cprogram',
source = 'src/sordi.c',
- includes = ['include', './src'],
+ includes = ['.', 'include', './src'],
use = 'libsord_profiled',
lib = test_libs,
target = 'sordi_static',
@@ -263,7 +265,7 @@ def build(bld):
if bld.env.COMPILER_CXX:
obj = bld(features = 'cxx cxxprogram',
source = 'src/sordmm_test.cpp',
- includes = ['include', './src'],
+ includes = ['.', 'include', './src'],
use = 'libsord_profiled',
lib = test_libs,
target = 'sordmm_test',
@@ -281,7 +283,7 @@ def build(bld):
for i in utils:
obj = bld(features = 'c cprogram',
source = 'src/%s.c' % i,
- includes = ['include', './src'],
+ includes = ['.', 'include', './src'],
use = 'libsord',
lib = libs,
uselib = 'SERD',