summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-10-26 08:16:25 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-10-26 08:49:46 +0200
commitb428b00b56723c131193b7eb37f4b86e50c9b7f4 (patch)
treeb39c5f58d62c1f7020d4c2a857cc26f389704ac5
parentadda7a1398785e011ee2010bf2869e98b2cccc68 (diff)
Adjust configure tests to ignore libs in /usr/local on macOS
On macOS, if pkg-config is not used, we modify CMAKE_SYSTEM_FRAMEWORK_PATH and CMAKE_SYSTEM_PREFIX_PATH to avoid picking up libs from homebrew or macports. This must be done in the configure tests too. Otherwise the find_package commands may return different things for configure tests and the Qt build itself. Task-number: QTBUG-97076 Change-Id: Iae9eabb09d27432973128ba05b59dbc0bd3b6cab Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--config.tests/winrt/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/config.tests/winrt/CMakeLists.txt b/config.tests/winrt/CMakeLists.txt
index d6db7de9..d0e46ca2 100644
--- a/config.tests/winrt/CMakeLists.txt
+++ b/config.tests/winrt/CMakeLists.txt
@@ -1,6 +1,13 @@
cmake_minimum_required(VERSION 3.16)
project(config_test_winrt LANGUAGES C CXX)
+if(DEFINED QT_CONFIG_COMPILE_TEST_CMAKE_SYSTEM_PREFIX_PATH)
+ set(CMAKE_SYSTEM_PREFIX_PATH "${QT_CONFIG_COMPILE_TEST_CMAKE_SYSTEM_PREFIX_PATH}")
+endif()
+if(DEFINED QT_CONFIG_COMPILE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH)
+ set(CMAKE_SYSTEM_FRAMEWORK_PATH "${QT_CONFIG_COMPILE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH}")
+endif()
+
foreach(p ${QT_CONFIG_COMPILE_TEST_PACKAGES})
find_package(${p})
endforeach()