2 VERSION = '0.11.0devel'
6 opt.load('compiler_cxx')
7 opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation')
8 opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to Windows')
9 opt.add_option('--static', action='store_true', default=False, help='build statically')
10 opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests')
13 conf.load('compiler_cxx')
14 conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-O2'])
16 if conf.options.enable_debug:
17 conf.env.append_value('CXXFLAGS', '-g')
19 conf.env.append_value('CXXFLAGS', '-O2')
21 conf.env.TARGET_WINDOWS = conf.options.target_windows
22 conf.env.STATIC = conf.options.static
23 conf.env.DISABLE_TESTS = conf.options.disable_tests
24 conf.env.API_VERSION = API_VERSION
26 if conf.options.target_windows:
27 boost_lib_suffix = '-mt'
31 conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='LIBXML++', mandatory=True)
33 conf.check_cxx(fragment="""
34 #include <boost/filesystem.hpp>\n
35 int main() { boost::filesystem::copy_file ("a", "b"); }\n
37 msg='Checking for boost filesystem library',
38 libpath='/usr/local/lib',
39 lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
40 uselib_store='BOOST_FILESYSTEM')
42 if not conf.options.disable_tests:
43 conf.check_cxx(fragment="""
44 #define BOOST_TEST_MODULE Config test\n
45 #include <boost/test/unit_test.hpp>\n
48 msg='Checking for boost unit testing library',
49 lib=['boost_unit_test_framework%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
50 uselib_store='BOOST_TEST')
56 bld(source='libcxml.pc.in',
58 includedir='%s/include' % bld.env.PREFIX,
59 libs="-L${libdir} -lcxml",
60 install_path='${LIBDIR}/pkgconfig')
63 if not bld.env.DISABLE_TESTS: