Various test hackery.
[libdcp.git] / wscript
1 APPNAME = 'libdcp'
2 VERSION = '0.01pre'
3
4 def options(opt):
5     opt.load('compiler_cxx')
6
7 def configure(conf):
8     conf.load('compiler_cxx')
9     conf.env.append_value('CXXFLAGS', ['-Wall', '-Werror', '-Wextra', '-O2', '-D_FILE_OFFSET_BITS=64'])
10     conf.env.append_value('CXXFLAGS', ['-DLIBDCP_VERSION="%s"' % VERSION])
11
12     conf.check_cfg(package = 'openssl', args = '--cflags --libs', uselib_store = 'OPENSSL', mandatory = True)
13     conf.check_cfg(package = 'sigc++-2.0', args = '--cflags --libs', uselib_store = 'SIGC++', mandatory = True)
14     
15     conf.check_cxx(fragment = """
16                               #include <boost/filesystem.hpp>\n
17                               int main() { boost::filesystem::copy_file ("a", "b"); }\n
18                               """,
19                    msg = 'Checking for boost filesystem library',
20                    libpath = '/usr/local/lib',
21                    lib = ['boost_filesystem', 'boost_system'],
22                    uselib_store = 'BOOST_FILESYSTEM')
23
24     conf.recurse('test')
25     conf.recurse('asdcplib')
26
27 def build(bld):
28     bld.recurse('src')
29     bld.recurse('test')
30     bld.recurse('asdcplib')
31