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')
9 conf.load('compiler_cxx')
10 conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-O2'])
12 conf.env.TARGET_WINDOWS = conf.options.target_windows
14 if conf.options.target_windows:
15 boost_lib_suffix = '-mt'
19 conf.check_cfg(package = 'libxml++-2.6', args = '--cflags --libs', uselib_store = 'LIBXML++', mandatory = True)
21 conf.check_cxx(fragment = """
22 #include <boost/filesystem.hpp>\n
23 int main() { boost::filesystem::copy_file ("a", "b"); }\n
25 msg = 'Checking for boost filesystem library',
26 libpath = '/usr/local/lib',
27 lib = ['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
28 uselib_store = 'BOOST_FILESYSTEM')
30 conf.check_cxx(fragment = """
31 #define BOOST_TEST_MODULE Config test\n
32 #include <boost/test/unit_test.hpp>\n
35 msg = 'Checking for boost unit testing library',
36 lib = ['boost_unit_test_framework%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
37 uselib_store = 'BOOST_TEST')
43 bld(source = 'libcxml.pc.in',
45 includedir = '%s/include' % bld.env.PREFIX,
46 libs = "-L${libdir} -lcxml",
47 install_path = '${LIBDIR}/pkgconfig')