-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL 3.2.0 target_precompile_headers makes Xcode 16.2 fail compilation #12078
Comments
What CMake version are you using? (Please provide the output of What if you use a recent cmake version? I'm thinking you're seeing this issue, which got fixed in CMake ~3.22. |
It’s 3.31.5, I am always on the latest available in homebrew on macOS. Actually the issue looks more like https://gitlab.kitware.com/cmake/cmake/-/issues/22832 The error output is the same. I left a comment there, but that issue is 3 years old with no resolution |
From your error message, why is it adding @slouken When you build SDL on macOS using the CMake project, does this also happen to you? cmake -S /path/to/SDL -B /tmp/SDL-cmake-build -GXcode --fresh
cmake --build /tmp/SDL-cmake-build |
cmake version 3.30.4 |
@tanis2000 If you really want to build SDL3 with XCode, then I can only suggest to configure with |
I'm not 100% sure but it might come from this: I had to add There is an open issue in this repo, too: #6454
Yes, it is the latest. And I have no idea if it happens with older versions. It's quite common for people on macOS to work with the latest version of Xcode as it is the only way to have your iOS apps compile against the latest iOS SDK.
Good suggestion, thanks. That way I do not need to touch the CMakeLists.txt in SDL and I can just use the sources as they are. |
I am not entirely sure this is an issue in the CMake definition of SDL or a bug in CMake or a bug in Xcode.
The actual problem is that
SDL/CMakeLists.txt
Line 3454 in cb3d6dc
SDL/CMakeLists.txt
Line 3478 in cb3d6dc
Somehow, those .pch are considered bad by Xcode and it is right because the actual files being included are some .gch files instead.
When using ninja everything works fine. Maybe someone already experienced this and knows why this is happening?
For the time being, a work-around is to comment those two lines and Xcode compiles correctly.
Here is the full error:
The text was updated successfully, but these errors were encountered: