diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-25 00:07:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-25 00:07:45 +0100 |
| commit | 948069a23d9c1b2a97d1f3d6a2c856396de205e3 (patch) | |
| tree | 3c008357d440feae598902fdac9a7a4b651f860d | |
| parent | 833fbe007db587961b99553a43f1af8076c52eb5 (diff) | |
| parent | 1162697d2568bd5fa01b62f03916783eeb5d5b50 (diff) | |
Merge.
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | src/wscript | 8 | ||||
| -rw-r--r-- | wscript | 4 |
3 files changed, 10 insertions, 4 deletions
@@ -5,5 +5,3 @@ def build(env, target): cmd += ' --target-windows' env.command(cmd) env.command('./waf build install') - - diff --git a/src/wscript b/src/wscript index e1c405a..70f4b27 100644 --- a/src/wscript +++ b/src/wscript @@ -1,5 +1,8 @@ def build(bld): - obj = bld(features = 'cxx cxxshlib') + if bld.env.STATIC: + obj = bld(features = 'cxx cxxstlib') + else: + obj = bld(features = 'cxx cxxshlib') obj.name = 'libcxml' obj.target = 'cxml' obj.export_includes = ['.'] @@ -7,3 +10,6 @@ def build(bld): obj.source = "cxml.cc" bld.install_files('${PREFIX}/include/libcxml', "cxml.h") + if bld.env.STATIC: + bld.install_files('${PREFIX}/lib', 'libcxml.a') + @@ -1,15 +1,17 @@ APPNAME = 'libcxml' -VERSION = '0.04pre' +VERSION = '0.05pre' def options(opt): opt.load('compiler_cxx') opt.add_option('--target-windows', action='store_true', default = False, help = 'set up to do a cross-compile to Windows') + opt.add_option('--static', action='store_true', default = False, help = 'build statically') def configure(conf): conf.load('compiler_cxx') conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-O2']) conf.env.TARGET_WINDOWS = conf.options.target_windows + conf.env.STATIC = conf.options.static if conf.options.target_windows: boost_lib_suffix = '-mt' |
