diff options
Diffstat (limited to 'util/cmake/pro2cmake.py')
-rwxr-xr-x | util/cmake/pro2cmake.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index e496a2448d..8d1a62ddc9 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -3912,7 +3912,17 @@ def handle_config_test_project(scope: Scope, cm_fh: IO[str]): project_name = os.path.splitext(os.path.basename(scope.file_absolute_path))[0] content = ( f"cmake_minimum_required(VERSION 3.14.0)\n" - f"project(config_test_{project_name} LANGUAGES CXX)\n" + f"project(config_test_{project_name} LANGUAGES C CXX)\n" + """ +foreach(p ${QT_CONFIG_COMPILE_TEST_PACKAGES}) + find_package(${p}) +endforeach() + +if(QT_CONFIG_COMPILE_TEST_LIBRARIES) + link_libraries(${QT_CONFIG_COMPILE_TEST_LIBRARIES}) +endif() + +""" ) cm_fh.write(f"{content}\n") |