[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')
|
print('Error: Invalid build tool')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
win_target = ''
|
|
||||||
if platform.system() != 'Windows':
|
|
||||||
win_target = '-A x64'
|
|
||||||
|
|
||||||
project_dir = os.getcwd()
|
project_dir = os.getcwd()
|
||||||
build_dir = '{:s}/build/{:s}'.format(project_dir, build_config)
|
build_dir = '{:s}/build/{:s}'.format(project_dir, build_config)
|
||||||
rm(build_dir)
|
rm(build_dir)
|
||||||
mkdir(build_dir)
|
mkdir(build_dir)
|
||||||
cmake_cmd = ['cmake', '-S', project_dir, '-B', build_dir, build_tool,
|
cmake_cmd = [
|
||||||
'-DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
|
'cmake', '-S', project_dir, '-B', build_dir, build_tool,
|
||||||
'-DCMAKE_TOOLCHAIN_FILE={:s}'.format(args.toolchain),
|
'-DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
|
||||||
'-DCMAKE_BUILD_TYPE={:s}'.format(build_type_arg),
|
'-DCMAKE_TOOLCHAIN_FILE={:s}'.format(args.toolchain),
|
||||||
'-DUSE_ASAN={:s}'.format(sanitizer_status),
|
'-DCMAKE_BUILD_TYPE={:s}'.format(build_type_arg),
|
||||||
'-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config),
|
'-DUSE_ASAN={:s}'.format(sanitizer_status),
|
||||||
'-DBUILDCORE_TARGET={:s}'.format(args.target),
|
'-DBUILDCORE_BUILD_CONFIG={:s}'.format(build_config),
|
||||||
win_target,
|
'-DBUILDCORE_TARGET={:s}'.format(args.target),
|
||||||
]
|
]
|
||||||
if qt_path != '':
|
if qt_path != '':
|
||||||
cmake_cmd.append(qt_path)
|
cmake_cmd.append(qt_path)
|
||||||
|
if platform.system() == 'Windows':
|
||||||
|
cmake_cmd.append('-A x64')
|
||||||
|
|
||||||
subprocess.run(cmake_cmd)
|
subprocess.run(cmake_cmd)
|
||||||
|
|
||||||
mkdir('dist')
|
mkdir('dist')
|
||||||
|
Loading…
Reference in New Issue
Block a user