5 opt.load('compiler_cxx')
6 opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to Windows')
7 opt.add_option('--static', action='store_true', default=False, help='build statically')
10 conf.load('compiler_cxx')
11 conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-O2'])
13 conf.env.TARGET_WINDOWS = conf.options.target_windows
14 conf.env.STATIC = conf.options.static
16 if conf.options.target_windows:
17 boost_lib_suffix = '-mt'
21 conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='LIBXML++', mandatory=True)
23 conf.check_cxx(fragment="""
24 #include <boost/filesystem.hpp>\n
25 int main() { boost::filesystem::copy_file ("a", "b"); }\n
27 msg='Checking for boost filesystem library',
28 libpath='/usr/local/lib',
29 lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
30 uselib_store='BOOST_FILESYSTEM')
32 conf.check_cxx(fragment="""
33 #define BOOST_TEST_MODULE Config test\n
34 #include <boost/test/unit_test.hpp>\n
37 msg='Checking for boost unit testing library',
38 lib=['boost_unit_test_framework%s' % boost_lib_suffix,
39 'boost_test_exec_monitor%s' % boost_lib_suffix,
40 'boost_system%s' % boost_lib_suffix],
41 uselib_store='BOOST_TEST')
47 bld(source='libcxml.pc.in',
49 includedir='%s/include' % bld.env.PREFIX,
50 libs="-L${libdir} -lcxml",
51 install_path='${LIBDIR}/pkgconfig')