[buildcore] Fix setup-build.py to omit win platform for non-Windows builds
This commit is contained in:
parent
a413dd06ec
commit
e7ecb65f7a
23
deps/buildcore/scripts/setup-build.py
vendored
23
deps/buildcore/scripts/setup-build.py
vendored
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user