Skip to content

Did Cmake support build iOS with mac catalyst

I'm going to build a iOS app which run on MacOS by mac catalyst I tried to config by cmake but get the error when find thread library

CMake Error at /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.15.2/share/cmake/Modules/FindThreads.cmake:220 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)

this is my config

  • CMAKE_SYSTEM_NAME=iOS
  • CMAKE_OSX_ARCHITECTURES=x86_64
  • CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk
  • MACOSX_DEPLOYMENT_TARGET=10.15

and comment line

if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhone(OS|Simulator)")
  message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an iOS SDK")
endif()

in file iOS-Initialize.cmake

Edited by Craig Scott
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information