Skip to content

Commit 76134c1

Browse files
authored
Merge pull request #36 from chlandsi/find-root-path-mode
make CMAKE_FIND_ROOT_PATH_MODE variables configurable
2 parents a177e3c + fbbb200 commit 76134c1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ios.toolchain.cmake

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,15 @@ set(CMAKE_SYSTEM_FRAMEWORK_PATH
602602
${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
603603
${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks)
604604
# Only search the specified iOS SDK, not the remainder of the host filesystem.
605-
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
606-
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
607-
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
605+
if( NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM )
606+
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
607+
endif()
608+
if( NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY )
609+
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
610+
endif()
611+
if( NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE )
612+
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
613+
endif()
608614

609615
#
610616
# Some helper-macros below to simplify and beautify the CMakeFile

0 commit comments

Comments
 (0)