diff --git a/CMakeLists.txt b/CMakeLists.txt index de162e206a..0d9a0e92db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -523,14 +523,15 @@ endfunction() # Put these BEFORE EXTERNALS or Boost WILL die # ============================================= if (APPLE) - foreach(fw Carbon Metal Cocoa IOKit CoreVideo CoreMedia Security UniformTypeIdentifiers) + if (IOS) + set(_libs Metal IOKit CoreVideo CoreMedia Security UniformTypeIdentifiers) + else() + set(_libs Carbon Metal Cocoa IOKit CoreVideo CoreMedia Security UniformTypeIdentifiers) + endif() + foreach(fw ${_libs}) find_library(${fw}_LIBRARY ${fw} REQUIRED) list(APPEND PLATFORM_LIBRARIES ${${fw}_LIBRARY}) endforeach() - if (IOS) - find_library(objc_LIBRARY objc REQUIRED) - list(APPEND PLATFORM_LIBRARIES ${objc_LIBRARY}) - endif() elseif (WIN32) # Target Windows 10 add_compile_definitions(_WIN32_WINNT=0x0A00 WINVER=0x0A00)