From 378cfbf96708625e98280c4145d1dbdd9bb009b8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 10 Jan 2011 01:46:16 +0000 Subject: Working semaphore implementation for OSX. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2809 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'wscript') 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) -- cgit v1.2.1