Skip to content

Commit e60ae0a

Browse files
committed
[cmake] add find_host_library into iOS toolchain file (cocos2d#19230)
1 parent 0a4adb1 commit e60ae0a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

cmake/ios.toolchain.cmake

+10-1
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,13 @@ macro(find_host_package)
203203
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
204204
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
205205
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
206-
endmacro(find_host_package)
206+
endmacro(find_host_package)
207+
208+
# This macro lets you find library on the host system
209+
macro(find_host_library)
210+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
211+
212+
find_library(${ARGN})
213+
214+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
215+
endmacro(find_host_library)

0 commit comments

Comments
 (0)