7 # Version of this package (even if built as a child)
11 LIBPBD_VERSION
= "%s.%s.%s" % (MAJOR
, MINOR
, MICRO
)
13 # Library version (UNIX style major, minor, micro)
14 # major increment <=> incompatible changes
15 # minor increment <=> compatible changes (additions)
16 # micro increment <=> no interface changes
17 LIBPBD_LIB_VERSION
= '4.1.0'
19 # Variables for 'waf dist'
21 VERSION
= LIBPBD_VERSION
27 path_prefix
= 'libs/pbd/'
30 autowaf
.set_options(opt
)
33 autowaf
.build_version_files(path_prefix
+'pbd/version.h', path_prefix
+'version.cc',
34 'libpbd', MAJOR
, MINOR
, MICRO
)
35 autowaf
.configure(conf
)
36 conf
.check_tool('compiler_cxx')
37 autowaf
.check_pkg(conf
, 'libxml-2.0', uselib_store
='XML')
38 autowaf
.check_pkg(conf
, 'sigc++-2.0', uselib_store
='SIGCPP', atleast_version
='2.0')
39 if sys
.platform
!= 'darwin':
40 autowaf
.check_pkg(conf
, 'uuid', uselib_store
='UUID')
42 conf
.check(function_name
='getmntent', header_name
='mntent.h', define_name
='HAVE_GETMNTENT')
43 conf
.check(header_name
='execinfo.h', define_name
='HAVE_EXECINFO')
44 conf
.check(header_name
='unistd.h', define_name
='HAVE_UNISTD')
45 if conf
.check_cc(function_name
='posix_memalign', header_name
='stdlib.h', ccflags
='-D_XOPEN_SOURCE=600') == False:
46 conf
.define ('NO_POSIX_MEMALIGN',1)
48 conf
.write_config_header('libpbd-config.h')
51 autowaf
.check_header(conf
, 'boost/shared_ptr.hpp')
52 autowaf
.check_header(conf
, 'boost/weak_ptr.hpp')
53 # autowaf.check_header(conf, 'boost/uuid/uuid.hpp')
57 obj
= bld
.new_task_gen('cxx', 'shlib')
66 controllable_descriptor.cc
98 stateful_diff_command.cc
111 if bld
.env
['DEBUG_RT_ALLOC']:
112 obj
.source
+= 'debug_rt_alloc.c'
114 obj
.export_incdirs
= ['.']
118 obj
.uselib
= 'GLIBMM SIGCPP XML UUID SNDFILE'
119 if sys
.platform
== 'darwin':
120 TaskGen
.task_gen
.mappings
['.mm'] = TaskGen
.task_gen
.mappings
['.cc']
121 obj
.source
+= 'cocoa_open_uri.mm'
123 obj
.vnum
= LIBPBD_LIB_VERSION
124 obj
.install_path
= os
.path
.join(bld
.env
['LIBDIR'], 'ardour3')
125 obj
.cxxflags
= ['-DPACKAGE="libpbd"']
127 if bld
.env
['build_target'] == 'x86_64':
128 obj
.cxxflags
+= [ '-DUSE_X86_64_ASM' ]
130 if bld
.env
['BUILD_TESTS'] and bld
.env
['HAVE_CPPUNIT']:
132 testobj
= bld
.new_task_gen('cxx', 'program')
136 test/scalar_properties.cc
139 testobj
.target
= 'run-tests'
140 testobj
.includes
= obj
.includes
+ ['test', '../pbd']
141 testobj
.uselib
= 'CPPUNIT XML SNDFILE'
142 testobj
.uselib_local
= 'libpbd'