From ec5898a8971b20289fae170fb69a2cabb42fa874 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 21 May 2022 16:22:15 -0500 Subject: [PATCH] [buildcore] Only append Qt path to CMake command if using Qt --- deps/buildcore/scripts/setup-build.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/deps/buildcore/scripts/setup-build.py b/deps/buildcore/scripts/setup-build.py index a6ef1f11..614fc009 100755 --- a/deps/buildcore/scripts/setup-build.py +++ b/deps/buildcore/scripts/setup-build.py @@ -66,15 +66,17 @@ def main(): build_dir = '{:s}/build/{:s}'.format(project_dir, build_config) rm(build_dir) mkdir(build_dir) - subprocess.run(['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), - qt_path, - ]) + 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) + subprocess.run(cmake_cmd) mkdir('dist') if int(args.current_build) != 0: