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')