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', '-std=c++98'])
15 conf.env.TARGET_WINDOWS = conf.options.target_windows
16 conf.env.STATIC = conf.options.static
17 conf.env.DISABLE_TESTS = conf.options.disable_tests
18 conf.env.API_VERSION = API_VERSION
20 if conf.options.target_windows:
21 boost_lib_suffix = '-mt'
25 conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='LIBXML++', mandatory=True)
27 conf.check_cxx(fragment="""
28 #include <boost/filesystem.hpp>\n
29 int main() { boost::filesystem::copy_file ("a", "b"); }\n
31 msg='Checking for boost filesystem library',
32 libpath='/usr/local/lib',
33 lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
34 uselib_store='BOOST_FILESYSTEM')
36 if not conf.options.disable_tests:
37 conf.check_cxx(fragment="""
38 #define BOOST_TEST_MODULE Config test\n
39 #include <boost/test/unit_test.hpp>\n
42 msg='Checking for boost unit testing library',
43 lib=['boost_unit_test_framework%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
44 uselib_store='BOOST_TEST')
50 bld(source='libcxml.pc.in',
52 includedir='%s/include' % bld.env.PREFIX,
53 libs="-L${libdir} -lcxml",
54 install_path='${LIBDIR}/pkgconfig')
57 if not bld.env.DISABLE_TESTS: