ios-cmake icon indicating copy to clipboard operation
ios-cmake copied to clipboard

[bug] invalid cmake syntax (use of CACHE INTERNAL with list command)

Open Znerole opened this issue 3 years ago • 1 comments

When updating CMAKE_FIND_ROOT_PATH, invalid syntax is used:

https://github.com/leetal/ios-cmake/blob/14092d317b84a3037e71b870d2117dda126811a3/ios.toolchain.cmake#L882

CACHE INTERNAL "" is not allowed with list. As a result, CMAKE_FIND_ROOT_PATH contains the literal entries "CACHE" and "INTERNAL".

Since with CMake I'm always a bit at a loss on what belongs to the cache, I have not idea how to correctly fix this. Possible fixes would be:

  set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH};${CMAKE_OSX_SYSROOT_INT}" CACHE INTERNAL "")

or maybe just

  list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_OSX_SYSROOT_INT}")

Znerole avatar Feb 07 '22 11:02 Znerole

Hi! Thanks for reporting this. I'll definitely fix this in the upcoming version!

leetal avatar Apr 04 '22 10:04 leetal