Fix thinko in cscript option defaults.
[dcpomatic.git] / wscript
diff --git a/wscript b/wscript
index d6637f3f8cbe3b32e13b4361c3dcdec5926c7bab..501bd4fb983df6544a71db6e4c1eb2817a5b119b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -48,6 +48,7 @@ def options(opt):
 
     opt.add_option('--enable-debug',      action='store_true', default=False, help='build with debugging information and without optimisation')
     opt.add_option('--disable-gui',       action='store_true', default=False, help='disable building of GUI tools')
+    opt.add_option('--player-only',       action='store_true', default=False, help='just build the player; no other tools')
     opt.add_option('--disable-tests',     action='store_true', default=False, help='disable building of tests')
     opt.add_option('--install-prefix',                         default=None,  help='prefix of where DCP-o-matic will be installed')
     opt.add_option('--target-windows',    action='store_true', default=False, help='set up to do a cross-compile to make a Windows package')
@@ -64,6 +65,7 @@ def options(opt):
     opt.add_option('--static-curl',       action='store_true', default=False, help='link statically to libcurl')
     opt.add_option('--workaround-gssapi', action='store_true', default=False, help='link to gssapi_krb5')
     opt.add_option('--force-cpp11',       action='store_true', default=False, help='force use of C++11')
+    opt.add_option('--variant',           help='build variant', choices=['swaroop'])
 
 def configure(conf):
     conf.load('compiler_cxx')
@@ -73,6 +75,7 @@ def configure(conf):
 
     # Save conf.options that we need elsewhere in conf.env
     conf.env.DISABLE_GUI = conf.options.disable_gui
+    conf.env.PLAYER_ONLY = conf.options.player_only
     conf.env.DISABLE_TESTS = conf.options.disable_tests
     conf.env.TARGET_WINDOWS = conf.options.target_windows
     conf.env.TARGET_OSX = sys.platform == 'darwin'
@@ -113,6 +116,9 @@ def configure(conf):
     else:
         conf.env.append_value('CXXFLAGS', '-O2')
 
+    if conf.options.variant is not None:
+        conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_VARIANT_%s' % conf.options.variant.upper())
+
     #
     # Windows/Linux/OS X specific
     #