summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-04-30 16:55:28 (GMT)
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-04-30 16:55:28 (GMT)
commit5f5e3062cf2394f4e28e078817e074892e9c508d (patch)
tree1132bdd94b0a746776791c7b0c700f92285b2927 /Modules
parent94c5fa5f7a189c1a99891bbacc6a3b291f399d7a (diff)
downloadCMake-5f5e3062cf2394f4e28e078817e074892e9c508d.zip
CMake-5f5e3062cf2394f4e28e078817e074892e9c508d.tar.gz
CMake-5f5e3062cf2394f4e28e078817e074892e9c508d.tar.bz2
iOS: Only look for packages in the provided CMAKE_FIND_ROOT_PATHs
Both CMAKE_FIND_ROOT_PATH_MODE_INCLUDE and CMAKE_FIND_ROOT_PATH_MODE_LIBRARY are set to "ONLY" when cross building to iOS, but appears that CMAKE_FIND_ROOT_PATH_MODE_PACKAGE was overlooked. This causes packages to be searched for in the host system as well, which is incorrect and can lead to linking issues. Set CMAKE_FIND_ROOT_PATH_MODE_PACKAGE to "ONLY" as well. CMAKE_FIND_ROOT_PATH_MODE_PROGRAM is not touched, because a user might want to find programs / tools on the host system.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index ab650ef..27e5e81 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -8,6 +8,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAK
list(APPEND CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}")
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
endif()
# Darwin versions: