summaryrefslogtreecommitdiff
path: root/config.tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-10-26 08:16:37 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-10-26 08:49:54 +0200
commit789553b01bdf99a35aec8ee0a4b10c17097a8e42 (patch)
treecd9baf89a0eb866dc43ceb31c7463b6080b5e1ec /config.tests
parentf1977883ad561b034ad95c801049a90915e81bc8 (diff)
downloadqtconnectivity-789553b01bdf99a35aec8ee0a4b10c17097a8e42.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: I649a816d60683dca781080f40670d8391ef566fa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/bluez/CMakeLists.txt7
-rw-r--r--config.tests/bluez_le/CMakeLists.txt7
-rw-r--r--config.tests/linux_crypto_api/CMakeLists.txt7
-rw-r--r--config.tests/winrt_bt/CMakeLists.txt7
4 files changed, 28 insertions, 0 deletions
diff --git a/config.tests/bluez/CMakeLists.txt b/config.tests/bluez/CMakeLists.txt
index 0f99f0d9..7045e817 100644
--- a/config.tests/bluez/CMakeLists.txt
+++ b/config.tests/bluez/CMakeLists.txt
@@ -1,6 +1,13 @@
cmake_minimum_required(VERSION 3.16)
project(config_test_bluez 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()
diff --git a/config.tests/bluez_le/CMakeLists.txt b/config.tests/bluez_le/CMakeLists.txt
index 2ffc8574..b63660e8 100644
--- a/config.tests/bluez_le/CMakeLists.txt
+++ b/config.tests/bluez_le/CMakeLists.txt
@@ -1,6 +1,13 @@
cmake_minimum_required(VERSION 3.16)
project(config_test_bluez_le 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()
diff --git a/config.tests/linux_crypto_api/CMakeLists.txt b/config.tests/linux_crypto_api/CMakeLists.txt
index 69a6f925..871554a9 100644
--- a/config.tests/linux_crypto_api/CMakeLists.txt
+++ b/config.tests/linux_crypto_api/CMakeLists.txt
@@ -1,6 +1,13 @@
cmake_minimum_required(VERSION 3.16)
project(config_test_linux_crypto_api 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()
diff --git a/config.tests/winrt_bt/CMakeLists.txt b/config.tests/winrt_bt/CMakeLists.txt
index 49c1eab9..4172245e 100644
--- a/config.tests/winrt_bt/CMakeLists.txt
+++ b/config.tests/winrt_bt/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()