-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Environment details
- Operating System+version: macOS 13.3.1
- Compiler+version: XCode/Apple Clang 14.0.3
- Conan version: 2.0.10
- Python version: 3.11.5
- CMake version: 3.27.5
Steps to reproduce
I'm not 100% sure if this is a configuration issue or a bug.
I made the following profile:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu20
compiler.libcxx=libc++
compiler.version=14
os=iOS
os.version=16.0
os.sdk_version=16.0
os.sdk=iphoneos
Inside of the conanfile I set the generator to Xcode with the CMakeToolchain class in generate
When I try to build with this profile I get:
CMake Error at /usr/local/Cellar/cmake/3.27.5/share/cmake/Modules/Platform/iOS-Initialize.cmake:4 (message):
iphoneos16.0 is not an iOS SDK
If I look inside of this file:
if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhone(OS|Simulator)")
message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an iOS SDK")
endif()
It seems like this is case sensitive? Or maybe it expects to start with a / for some reason?
however Conan sets it to be lowercase in the conan_toolchain.cmake file:
set(CMAKE_OSX_SYSROOT iphoneos16.0 CACHE STRING "" FORCE)
Can I disable setting the sysroot? Or should this be fixed inside of conan?
On this specific system I tested without setting the sysroot and this builds just fine:
cmake -G Xcode -B build \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_DEPLOYMENT_TARGET=16.0
xcodebuild -target zlibstatic -project build/zlib.xcodeproj
Though without setting it i'm not really sure how to select the simulator
Logs
No response
Reactions are currently unavailable