blob: 97e10a87b47c3912cc4f07b863491de6d700044f [file] [log] [blame]
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -08001# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
2
Alexander Afanasyev182fdc22012-03-05 18:06:52 -08003VERSION='0.0.1'
4APPNAME='sync'
5
Alexander Afanasyeve76f2632012-03-05 00:18:42 -08006def options(opt):
7 opt.load('compiler_c')
8 opt.load('compiler_cxx')
Alexander Afanasyev182fdc22012-03-05 18:06:52 -08009 opt.load('boost')
10 opt.load('doxygen')
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080011
Alexander Afanasyev8f25cbb2012-03-01 23:53:40 -080012def configure(conf):
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080013 conf.load("compiler_cxx")
Alexander Afanasyev8f25cbb2012-03-01 23:53:40 -080014 conf.check_cfg(atleast_pkgconfig_version='0.20')
15 conf.check_cfg(package='openssl', args=['--cflags', '--libs'], uselib_store='SSL')
Alexander Afanasyev58c77b02012-03-05 21:52:25 -080016 conf.check_cfg(package='libxml-2.0', args=['--cflags', '--libs'], uselib_store='XML')
Alexander Afanasyev146a51b2012-03-05 10:47:35 -080017 conf.define ('STANDALONE', 1)
Alexander Afanasyev2fc2d672012-03-05 16:57:39 -080018 # conf.define ('DIGEST_BASE64', 1) # base64 is not working and probably will not work at all
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080019
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080020 conf.load('boost')
Alexander Afanasyevb71beab2012-03-05 21:13:49 -080021 conf.check_boost(lib='system iostreams test')
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080022
23 conf.load('doxygen')
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080024
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080025def build (bld):
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080026 bld.shlib (target=APPNAME,
27 features=['cxx', 'cxxshlib'],
28 source = bld.path.ant_glob(['model/sync-*.cc',
29 'helper/sync-*.cc']),
Alexander Afanasyev58c77b02012-03-05 21:52:25 -080030 uselib = 'BOOST BOOST_IOSTREAMS SSL XML'
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080031 )
Alexander Afanasyevec1d4a72012-03-05 11:06:54 -080032
Alexander Afanasyev150f14d2012-03-05 21:24:49 -080033 # Unit tests
34 bld.program (target="utit-tests",
35 source = bld.path.ant_glob(['test/**/*.cc']),
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080036 features=['cxx', 'cxxprogram'],
Alexander Afanasyevb71beab2012-03-05 21:13:49 -080037 use = 'BOOST_TEST sync')
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080038
Alexander Afanasyev150f14d2012-03-05 21:24:49 -080039
40# doxygen docs
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080041from waflib.Build import BuildContext
42class doxy (BuildContext):
43 cmd = "doxygen"
44 fun = "doxygen"
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080045
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080046def doxygen (bld):
47 bld (features="doxygen",
48 doxyfile='doc/doxygen.conf',
49 output_dir = 'doc')