From e7ecb65f7ad7bd1711673dc328094088e98de25f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 10 Jul 2022 02:43:12 -0500 Subject: [PATCH] [buildcore] Fix setup-build.py to omit win platform for non-Windows builds --- deps/buildcore/scripts/setup-build.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/deps/buildcore/scripts/setup-build.py b/deps/buildcore/scripts/setup-build.py index e4e60546..34ab18a9 100755 --- a/deps/buildcore/scripts/setup-build.py +++ b/deps/buildcore/scripts/setup-build.py @@ -62,25 +62,24 @@ def main(): print('Error: Invalid build tool') sys.exit(1) - win_target = '' - if platform.system() != 'Windows': - win_target = '-A x64' - project_dir = os.getcwd() build_dir = '{:s}/build/{:s}'.format(project_dir, build_config) rm(build_dir) mkdir(build_dir) - cmake_cmd = ['cmake', '-S', project_dir, '-B', build_dir, build_tool, - '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', - '-DCMAKE_TOOLCHAIN_FILE={:s}'.format(args.toolchain), - '-DCMAKE_BUILD_TYPE={:s}'.format(build_type_arg), - '-DUSE_ASAN={:s}'.format(sanitizer_status), - '-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config), - '-DBUILDCORE_TARGET={:s}'.format(args.target), - win_target, + cmake_cmd = [ + 'cmake', '-S', project_dir, '-B', build_dir, build_tool, + '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', + '-DCMAKE_TOOLCHAIN_FILE={:s}'.format(args.toolchain), + '-DCMAKE_BUILD_TYPE={:s}'.format(build_type_arg), + '-DUSE_ASAN={:s}'.format(sanitizer_status), + '-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config), + '-DBUILDCORE_TARGET={:s}'.format(args.target), ] if qt_path != '': cmake_cmd.append(qt_path) + if platform.system() == 'Windows': + cmake_cmd.append('-A x64') + subprocess.run(cmake_cmd) mkdir('dist')