diff options
author | David Robillard <d@drobilla.net> | 2018-09-15 11:37:06 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-15 11:44:26 +0200 |
commit | 8093902d95568f8de75aae763ca348783d483361 (patch) | |
tree | e6e76db582ce19a67eb6c5fbfbbbf5d068400018 /wscript | |
parent | bdb65b8abcc402006ddb3e90e4a44fc1d0435ca2 (diff) | |
download | pugl-8093902d95568f8de75aae763ca348783d483361.tar.gz pugl-8093902d95568f8de75aae763ca348783d483361.tar.bz2 pugl-8093902d95568f8de75aae763ca348783d483361.zip |
Clean up waf options
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 30 |
1 files changed, 13 insertions, 17 deletions
@@ -23,19 +23,17 @@ def options(opt): autowaf.set_options(opt) opt = opt.get_option_group('Configuration options') - flags = { - 'no-gl': 'do not build OpenGL support', - 'no-cairo': 'do not build Cairo support', - 'static': 'build static library', - 'log': 'print GL information to console', - 'grab-focus': 'work around reparent keyboard issues by grabbing focus'} - - for name, desc in flags.items(): - opt.add_option('--' + name, action='store_true', - dest=name.replace('-', '_'), help=desc) - opt.add_option('--target', default=None, dest='target', - help='Target platform (e.g. "win32" or "darwin")') + help='target platform (e.g. "win32" or "darwin")') + + autowaf.add_flags( + opt, + {'no-gl': 'do not build OpenGL support', + 'no-cairo': 'do not build Cairo support', + 'static': 'build static library', + 'test': 'build test programs', + 'log': 'print GL information to console', + 'grab-focus': 'work around reparent keyboard issues by grabbing focus'}) def configure(conf): conf.env.TARGET_PLATFORM = Options.options.target or sys.platform @@ -64,11 +62,9 @@ def configure(conf): autowaf.define(conf, 'PUGL_VERBOSE', 1) # Shared library building is broken on win32 for some reason - conf.env['BUILD_TESTS'] = Options.options.build_tests - conf.env['BUILD_SHARED'] = (conf.env.TARGET_PLATFORM != 'win32' or - Options.options.shared) - conf.env['BUILD_STATIC'] = (Options.options.build_tests or - Options.options.static) + conf.env['BUILD_TESTS'] = Options.options.test + conf.env['BUILD_SHARED'] = conf.env.TARGET_PLATFORM != 'win32' + conf.env['BUILD_STATIC'] = (Options.options.test or Options.options.static) autowaf.define(conf, 'PUGL_VERSION', PUGL_VERSION) conf.write_config_header('pugl_config.h', remove=False) |