Browse Source

iOS: Allow setting multiple CMAKE_FIND_ROOT_PATH values

Currently the value is hardcoded to contain only the sysroot for
the respective darwin platform. This means that it can not be changed
in a custom toolchain file.

Instead of overriding the value, simply append it. This is similar
to how it is done in the Google provided Android toolchain file.

The usecase is to allow specifying addiitonal roots to look for
3rd party packages which are definitely not present in the default
sysroot.
Alexandru Croitor 6 years ago
parent
commit
94c5fa5f7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/Platform/Darwin.cmake

+ 1 - 1
Modules/Platform/Darwin.cmake

@@ -5,7 +5,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS" OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAK
     set(CMAKE_MACOSX_BUNDLE ON)
   endif()
 
-  set(CMAKE_FIND_ROOT_PATH "${_CMAKE_OSX_SYSROOT_PATH}")
+  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)
 endif()