From f513c4cadea2fe2a2cb1b8abc733acbf016940c7 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 23 Aug 2023 10:11:15 +0200 Subject: [PATCH] CMake: Rename QT_EXAMPLES_CMAKE_PREFIX_PATH ...to QT_BUILD_CMAKE_PREFIX_PATH, because the variable is now used for examples and tests. Change-Id: Ie6d32a0c99f46407f2771e12638456078c59fb18 Reviewed-by: Alexey Edelev (cherry picked from commit d5c4d6eb776b4b5e5299de519deb17af66048008) --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 10 +++++----- cmake/QtConfig.cmake.in | 2 +- cmake/QtModuleDependencies.cmake.in | 2 +- cmake/QtPublicDependencyHelpers.cmake | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index 501a4424cf1..3de8ffbfd22 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -735,9 +735,9 @@ endfunction() macro(qt_build_tests) set(CMAKE_UNITY_BUILD OFF) - # Prepending to QT_EXAMPLES_CMAKE_PREFIX_PATH helps find components of Qt6, because those + # Prepending to QT_BUILD_CMAKE_PREFIX_PATH helps find components of Qt6, because those # find_package calls use NO_DEFAULT_PATH, and thus CMAKE_PREFIX_PATH is ignored. - list(PREPEND QT_EXAMPLES_CMAKE_PREFIX_PATH "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/cmake") + list(PREPEND QT_BUILD_CMAKE_PREFIX_PATH "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/cmake") if(QT_BUILD_STANDALONE_TESTS) # Find location of TestsConfig.cmake. These contain the modules that need to be @@ -981,14 +981,14 @@ macro(qt_examples_build_begin) # Examples that are built as part of the Qt build need to use the CMake config files from the # build dir, because they are not installed yet in a prefix build. # Prepending to CMAKE_PREFIX_PATH helps find the initial Qt6Config.cmake. - # Prepending to QT_EXAMPLES_CMAKE_PREFIX_PATH helps find components of Qt6, because those + # Prepending to QT_BUILD_CMAKE_PREFIX_PATH helps find components of Qt6, because those # find_package calls use NO_DEFAULT_PATH, and thus CMAKE_PREFIX_PATH is ignored. # Prepending to CMAKE_FIND_ROOT_PATH ensures the components are found while cross-compiling # without setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to BOTH. if(NOT QT_IS_EXTERNAL_EXAMPLES_BUILD OR NOT __qt_all_examples_ported_to_external_projects) qt_internal_set_up_build_dir_package_paths() list(PREPEND CMAKE_FIND_ROOT_PATH "${QT_BUILD_DIR}") - list(PREPEND QT_EXAMPLES_CMAKE_PREFIX_PATH "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/cmake") + list(PREPEND QT_BUILD_CMAKE_PREFIX_PATH "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/cmake") endif() # Because CMAKE_INSTALL_RPATH is empty by default in the repo project, examples need to have @@ -1267,7 +1267,7 @@ function(qt_internal_add_example_external_project subdir) CMAKE_BUILD_TYPE:STRING CMAKE_CONFIGURATION_TYPES:STRING CMAKE_PREFIX_PATH:STRING - QT_EXAMPLES_CMAKE_PREFIX_PATH:STRING + QT_BUILD_CMAKE_PREFIX_PATH:STRING QT_ADDITIONAL_PACKAGES_PREFIX_PATH:STRING CMAKE_FIND_ROOT_PATH:STRING BUILD_SHARED_LIBS:BOOL diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in index a8cccdaa841..3edd82f76d9 100644 --- a/cmake/QtConfig.cmake.in +++ b/cmake/QtConfig.cmake.in @@ -136,7 +136,7 @@ foreach(module ${@INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS}) PATHS ${_qt_cmake_dir} ${_qt_additional_packages_prefix_paths} - ${QT_EXAMPLES_CMAKE_PREFIX_PATH} + ${QT_BUILD_CMAKE_PREFIX_PATH} ${__qt_find_package_host_qt_path} ${_qt_additional_host_packages_prefix_paths} ${__qt_use_no_default_path_for_qt_packages} diff --git a/cmake/QtModuleDependencies.cmake.in b/cmake/QtModuleDependencies.cmake.in index c6c68ceb497..2e9b36fdb6f 100644 --- a/cmake/QtModuleDependencies.cmake.in +++ b/cmake/QtModuleDependencies.cmake.in @@ -19,7 +19,7 @@ if(NOT @INSTALL_CMAKE_NAMESPACE@_FOUND) "${CMAKE_CURRENT_LIST_DIR}/.." "${_qt_cmake_dir}" ${_qt_additional_packages_prefix_paths} - ${QT_EXAMPLES_CMAKE_PREFIX_PATH} + ${QT_BUILD_CMAKE_PREFIX_PATH} ${__qt_use_no_default_path_for_qt_packages} ) endif() diff --git a/cmake/QtPublicDependencyHelpers.cmake b/cmake/QtPublicDependencyHelpers.cmake index de62eb1c103..e3f4126c73f 100644 --- a/cmake/QtPublicDependencyHelpers.cmake +++ b/cmake/QtPublicDependencyHelpers.cmake @@ -114,7 +114,7 @@ macro(_qt_internal_find_qt_dependencies target target_dep_list find_dependency_p PATHS ${${find_dependency_path_list}} ${_qt_additional_packages_prefix_paths} - ${QT_EXAMPLES_CMAKE_PREFIX_PATH} + ${QT_BUILD_CMAKE_PREFIX_PATH} ${__qt_use_no_default_path_for_qt_packages} ) endif()