summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-04-30 17:10:08 (GMT)
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-04-30 17:10:08 (GMT)
commit4783b842baf0e081b3385b00d696b6635eee655d (patch)
tree69001226634832bdc80a22dc0561d647fc05c3d0 /Modules
parent5f5e3062cf2394f4e28e078817e074892e9c508d (diff)
downloadCMake-4783b842baf0e081b3385b00d696b6635eee655d.zip
CMake-4783b842baf0e081b3385b00d696b6635eee655d.tar.gz
CMake-4783b842baf0e081b3385b00d696b6635eee655d.tar.bz2
iOS: Only set the CMAKE_FIND_ROOT_PATH_MODE_* variables when not defined
This allows overriding them in a toolchain file.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Darwin.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index 27e5e81..7e02814 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -6,9 +6,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAK
endif()
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)
+ if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ endif()
+ if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_INCLUDE)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+ endif()
+ if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_PACKAGE)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+ endif()
endif()
# Darwin versions: