Fix static build.
[libdcp.git] / test / wscript
1 def configure(conf):
2     if conf.options.target_windows:
3         boost_lib_suffix = '-mt'
4     else:
5         boost_lib_suffix = ''
6
7     conf.check_cxx(fragment = """
8                               #define BOOST_TEST_MODULE Config test\n
9                               #include <boost/test/unit_test.hpp>\n
10                               int main() {}
11                               """,
12                               msg = 'Checking for boost unit testing library',
13                               lib = 'boost_unit_test_framework%s' % boost_lib_suffix,
14                               uselib_store = 'BOOST_TEST')
15
16     conf.env.prepend_value('LINKFLAGS', '-Lsrc')
17
18 def build(bld):
19     obj = bld(features = 'cxx cxxprogram')
20     obj.name   = 'tests'
21     obj.uselib = 'BOOST_TEST OPENJPEG CXML'
22     obj.use    = 'libdcp'
23     obj.source = 'tests.cc'
24     obj.target = 'tests'
25     obj.install_path = ''
26
27     obj = bld(features = 'cxx cxxprogram')
28     obj.name   = 'subs_in_out'
29     obj.uselib = 'BOOST_TEST OPENJPEG CXML'
30     obj.use    = 'libdcp'
31     obj.source = 'subs_in_out.cc'
32     obj.target = 'subs_in_out'
33     obj.install_path = ''
34
35     obj = bld(features = 'cxx cxxprogram')
36     obj.name   = 'rewrite_subs'
37     obj.uselib = 'BOOST_TEST OPENJPEG CXML'
38     obj.use    = 'libdcp'
39     obj.source = 'rewrite_subs.cc'
40     obj.target = 'rewrite_subs'
41     obj.install_path = ''