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
This commit is contained in:
Brad King
2019-05-02 13:46:32 +00:00
committed by Kitware Robot
+13 -4
View File
@@ -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: