blob: b5e60a806f217d55330a3ea54bfd9b8eb634715b [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 Afanasyev146a51b2012-03-05 10:47:35 -080016 conf.define ('STANDALONE', 1)
Alexander Afanasyev2fc2d672012-03-05 16:57:39 -080017 # conf.define ('DIGEST_BASE64', 1) # base64 is not working and probably will not work at all
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080018
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080019 conf.load('boost')
Alexander Afanasyevb71beab2012-03-05 21:13:49 -080020 conf.check_boost(lib='system iostreams test')
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080021
22 conf.load('doxygen')
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080023
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080024def build (bld):
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080025 bld.shlib (target=APPNAME,
26 features=['cxx', 'cxxshlib'],
27 source = bld.path.ant_glob(['model/sync-*.cc',
28 'helper/sync-*.cc']),
29 uselib = 'BOOST BOOST_IOSTREAMS SSL'
30 )
Alexander Afanasyevec1d4a72012-03-05 11:06:54 -080031
Alexander Afanasyev150f14d2012-03-05 21:24:49 -080032 # Unit tests
33 bld.program (target="utit-tests",
34 source = bld.path.ant_glob(['test/**/*.cc']),
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080035 features=['cxx', 'cxxprogram'],
Alexander Afanasyevb71beab2012-03-05 21:13:49 -080036 use = 'BOOST_TEST sync')
Alexander Afanasyeve76f2632012-03-05 00:18:42 -080037
Alexander Afanasyev150f14d2012-03-05 21:24:49 -080038
39# doxygen docs
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080040from waflib.Build import BuildContext
41class doxy (BuildContext):
42 cmd = "doxygen"
43 fun = "doxygen"
Alexander Afanasyev7a696fb2012-03-01 17:17:22 -080044
Alexander Afanasyev182fdc22012-03-05 18:06:52 -080045def doxygen (bld):
46 bld (features="doxygen",
47 doxyfile='doc/doxygen.conf',
48 output_dir = 'doc')