b28c366bf1310259810d3c7ee87d39920234553d
[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_cc(msg = 'Checking for libkumu',
13                   function_name = 'Kumu::Version',
14                   header_name = 'KM_util.h',
15                   lib = 'kumu',
16                   uselib_store = 'KUMU',
17                   mandatory = True)
18
19     conf.check_cc(msg = 'Checking for asdcplib',
20                   function_name = 'ASDCP::Version',
21                   header_name = 'AS_DCP.h',
22                   lib = 'asdcp',
23                   uselib_store = 'ASDCP',
24                   mandatory = True)
25
26     conf.check_cfg(package = 'openssl', args = '--cflags --libs', uselib_store = 'OPENSSL', mandatory = True)
27     conf.check_cfg(package = 'sigc++-2.0', args = '--cflags --libs', uselib_store = 'SIGC++', mandatory = True)
28     
29     conf.check_cxx(fragment = """
30                               #include <boost/filesystem.hpp>\n
31                               int main() { boost::filesystem::copy_file ("a", "b"); }\n
32                               """,
33                    msg = 'Checking for boost filesystem library',
34                    libpath = '/usr/local/lib',
35                    lib = ['boost_filesystem', 'boost_system'],
36                    uselib_store = 'BOOST_FILESYSTEM')
37
38     conf.recurse('test')
39
40 def build(bld):
41     bld.recurse('src')
42     bld.recurse('test')
43