diff options
author | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-09-24 23:06:45 -0400 |
---|---|---|
committer | Elliott Sales de Andrade <quantum.analyst@gmail.com> | 2017-09-25 14:36:01 -0400 |
commit | f9e463bce2607c5136acc79ecd495f8b62b8e5ad (patch) | |
tree | 7581d62804f8d484bf21e87be5bb7d73ee19abdd /platform | |
parent | 0a6446ff361f1674649e1625eb5868478d998091 (diff) |
Use EnumVariable for choice-based build options.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/detect.py | 3 | ||||
-rw-r--r-- | platform/haiku/detect.py | 3 | ||||
-rw-r--r-- | platform/osx/detect.py | 3 | ||||
-rw-r--r-- | platform/windows/detect.py | 3 | ||||
-rw-r--r-- | platform/x11/detect.py | 3 |
5 files changed, 10 insertions, 5 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py index c1ac54c587..6640a053fe 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -18,11 +18,12 @@ def can_build(): def get_opts(): + from SCons.Variables import EnumVariable return [ ('ANDROID_NDK_ROOT', 'Path to the Android NDK', os.environ.get("ANDROID_NDK_ROOT", 0)), ('ndk_platform', 'Target platform (android-<api>, e.g. "android-18")', "android-18"), - ('android_arch', 'Target architecture (armv7/armv6/arm64v8/x86)', "armv7"), + EnumVariable('android_arch', 'Target architecture', "armv7", ('armv7', 'armv6', 'arm64v8', 'x86')), ('android_neon', 'Enable NEON support (armv7 only)', "yes"), ('android_stl', 'Enable Android STL support (for modules)', "no") ] diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index 61ee32d2dd..50f9783dd2 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -19,9 +19,10 @@ def can_build(): def get_opts(): + from SCons.Variables import EnumVariable return [ - ('debug_symbols', 'Add debug symbols to release version (yes/no/full)', 'yes') + EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), ] diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 24302b5ff9..3ae95f188d 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -19,10 +19,11 @@ def can_build(): def get_opts(): + from SCons.Variables import EnumVariable return [ ('osxcross_sdk', 'OSXCross SDK version', 'darwin14'), - ('debug_symbols', 'Add debug symbols to release version (yes/no/full)', 'yes'), + EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), ] diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 053ea466f3..1b7a992668 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -49,6 +49,7 @@ def can_build(): def get_opts(): + from SCons.Variables import EnumVariable mingw32 = "" mingw64 = "" @@ -65,7 +66,7 @@ def get_opts(): ('mingw_prefix_32', 'MinGW prefix (Win32)', mingw32), ('mingw_prefix_64', 'MinGW prefix (Win64)', mingw64), ('use_lto', 'Use link time optimization (when using MingW)', 'no'), - ('debug_symbols', 'Add debug symbols to release version (yes/no/full)', 'yes') + EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), ] diff --git a/platform/x11/detect.py b/platform/x11/detect.py index b9b4ad8201..be21aa8f8e 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -45,6 +45,7 @@ def can_build(): return True def get_opts(): + from SCons.Variables import EnumVariable return [ ('use_llvm', 'Use the LLVM compiler', 'no'), @@ -54,7 +55,7 @@ def get_opts(): ('use_lto', 'Use link time optimization', 'no'), ('pulseaudio', 'Detect & use pulseaudio', 'yes'), ('udev', 'Use udev for gamepad connection callbacks', 'no'), - ('debug_symbols', 'Add debug symbols to release version (yes/no/full)', 'yes') + EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), ] |