summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-10 01:46:16 +0000
committerDavid Robillard <d@drobilla.net>2011-01-10 01:46:16 +0000
commit378cfbf96708625e98280c4145d1dbdd9bb009b8 (patch)
tree7deb1334a7b48f290cde76a8cd91dfce3f20c0c2 /wscript
parent00aae38aecaccc9e245a3da85f619cf4503c1855 (diff)
downloadraul-378cfbf96708625e98280c4145d1dbdd9bb009b8.tar.gz
raul-378cfbf96708625e98280c4145d1dbdd9bb009b8.tar.bz2
raul-378cfbf96708625e98280c4145d1dbdd9bb009b8.zip
Working semaphore implementation for OSX.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2809 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript17
1 files changed, 14 insertions, 3 deletions
diff --git a/wscript b/wscript
index 44c7067..4b2318f 100644
--- a/wscript
+++ b/wscript
@@ -88,7 +88,10 @@ def build(bld):
bld.install_files('${INCLUDEDIR}/raul', bld.path.ant_glob('raul/*.h'))
# Pkgconfig file
- autowaf.build_pc(bld, 'RAUL', RAUL_VERSION, 'GLIB GTHREAD')
+ dict = {}
+ if Options.platform == 'darwin':
+ dict = {'RAUL_PC_LIBS': '-framework CoreServices'}
+ autowaf.build_pc(bld, 'RAUL', RAUL_VERSION, 'GLIB GTHREAD', subst_dict=dict)
lib_source = '''
src/Configuration.cpp
@@ -101,6 +104,11 @@ def build(bld):
src/log.cpp
'''
+ def set_link_flags(obj):
+ obj.linkflags = []
+ if Options.platform == 'darwin':
+ obj.linkflags = ['-framework', 'CoreServices']
+
# Library
obj = bld(features = 'cxx cxxshlib')
obj.export_includes = ['.']
@@ -111,7 +119,8 @@ def build(bld):
obj.uselib = 'GLIB GTHREAD'
obj.install_path = '${LIBDIR}'
obj.vnum = RAUL_LIB_VERSION
-
+ set_link_flags(obj)
+
if bld.env['BUILD_TESTS']:
# Static library (for unit test code coverage)
obj = bld(features = 'cxx cxxstlib')
@@ -122,6 +131,7 @@ def build(bld):
obj.uselib = 'GLIB GTHREAD'
obj.install_path = ''
obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+ set_link_flags(obj)
# Unit tests
for i in tests.split():
@@ -130,10 +140,11 @@ def build(bld):
obj.includes = ['.', './src']
obj.use = 'libraul_static'
obj.uselib = 'GLIB GTHREAD'
- obj.linkflags = '-lgcov'
obj.target = i
obj.install_path = ''
obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+ set_link_flags(obj)
+ obj.linkflags += ['-lgcov']
# Documentation
autowaf.build_dox(bld, 'RAUL', RAUL_VERSION, top, out)