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