ruslo / polly

:wrench: Collection of CMake toolchain files and scripts for cross-platform build and CI testing (GCC, Visual Studio, iOS, Android, Clang analyzer, sanitizers etc.)
BSD 2-Clause "Simplified" License
862 stars 191 forks source link

Add support for Apple's Project Catalyst #326

Closed olliwang closed 5 years ago

olliwang commented 5 years ago

Apple introduces Project Catalyst at WWDC 2019 to allows iOS apps running on macOS without heavily modifying the code. The problem is; currently, the toolchains build either iOS/Simulator or macOS libraries. To support Project Catalyst, we need a new toolchain to build fat libraries that include all of iOS, Simulator, and macOS architectures. Is it possible?

ruslo commented 5 years ago

Closing inactive discussion.

DimaRU commented 4 years ago

Example of working toolchain:

set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx")
set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-maccatalyst")
set(CMAKE_XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.15")
set(CMAKE_C_FLAGS "-target x86_64-apple-ios13.0-macabi -Wno-overriding-t-option")
set(CMAKE_CXX_FLAGS "-target x86_64-apple-ios13.0-macabi -Wno-overriding-t-option")