diff options
author | Brad King <brad.king@kitware.com> | 2019-05-02 13:46:32 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-02 13:46:39 (GMT) |
commit | ce79364581643700ab88ee4c442e0cf1736c926e (patch) | |
tree | a14779f4c2dbe988d340da58c2506d8262785d62 | |
parent | eef1dacf51ea32b98596608e6d4dab0f18b1457b (diff) | |
parent | 4783b842baf0e081b3385b00d696b6635eee655d (diff) | |
download | CMake-ce79364581643700ab88ee4c442e0cf1736c926e.zip CMake-ce79364581643700ab88ee4c442e0cf1736c926e.tar.gz CMake-ce79364581643700ab88ee4c442e0cf1736c926e.tar.bz2 |
Merge topic 'ios_fixes'
4783b842ba iOS: Only set the CMAKE_FIND_ROOT_PATH_MODE_* variables when not defined
5f5e3062cf iOS: Only look for packages in the provided CMAKE_FIND_ROOT_PATHs
94c5fa5f7a iOS: Allow setting multiple CMAKE_FIND_ROOT_PATH values
1011350694 iOS: Allow specifying CMAKE_MACOSX_BUNDLE in toolchain file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3273
-rw-r--r-- | Modules/Platform/Darwin.cmake | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index 5590433..7e02814 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -1,11 +1,20 @@ set(APPLE 1) if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "watchOS") - set(CMAKE_MACOSX_BUNDLE ON) + if(NOT DEFINED CMAKE_MACOSX_BUNDLE) + set(CMAKE_MACOSX_BUNDLE ON) + endif() - set(CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}") - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + list(APPEND CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}") + 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: |