summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-10-26 08:16:35 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-10-26 08:50:05 +0200
commite39dec7453f2c11c74e559b1e1588b52c457776c (patch)
tree8231f150871c58988904a6c9107af2decf196e2a
parent00b2f8accfa1dd6dc3a3ffcbbc0556275ff3041d (diff)
downloadqtwayland-e39dec7453f2c11c74e559b1e1588b52c457776c.tar.gz
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: I2077c42fc54736dc9f4a575ecd41297ee8f755b2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--config.tests/wayland_scanner/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/config.tests/wayland_scanner/CMakeLists.txt b/config.tests/wayland_scanner/CMakeLists.txt
index f531b01c..d444aa9c 100644
--- a/config.tests/wayland_scanner/CMakeLists.txt
+++ b/config.tests/wayland_scanner/CMakeLists.txt
@@ -3,6 +3,13 @@
cmake_minimum_required(VERSION 3.16)
project(config_test_wayland_scanner 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()