| Summary: | cmakelists completly broken in latest cmake/macos/xcode combo | ||
|---|---|---|---|
| Product: | SDL | Reporter: | dungaipara |
| Component: | build | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | icculus, koliap |
| Version: | don't know | Keywords: | target-2.0.6 |
| Hardware: | x86_64 | ||
| OS: | macOS 10.13 | ||
| Attachments: |
THE FIX
Possible fix |
||
Possible fix. Changed CMakelist.txt Add frameworks based on target (osx/ios). See SDL_Build_Bug_3625.diff attachment. Created attachment 2755 [details]
Possible fix
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.) Tagging a bunch of bugs as target-2.0.6. This means we're in the final stretch for an official SDL 2.0.6 release! These are the bugs we really want to fix before shipping if humanly possible. That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.6 release, and generally be organized about what we're aiming to ship. After some debate, we might just remove this tag again and deal with it for a later release. Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment. Thanks! --ryan. I'll be exploring this shortly, but it's worth noting that the "Xcode" directory has a real custom Xcode project for SDL, so you don't have to generate one with CMake. --ryan. Both these issues should be fixed by https://hg.libsdl.org/SDL/rev/670978408a10 and a few patches committed before it. --ryan. |
Created attachment 2716 [details] THE FIX Using the latest xcode 8.3, latest mac os, latest svn sdl2 from github mirror. Everything goes fine until the link stage. At link stage xcode complains that it can't find Cocoa and Carbon. If you manually remove those two in the build settings it then complains about that undefined macro. Here is how I personally fixed it: By editing the cmakelists myself with the following C++ code. It works because xcode can now automaticaly find all the frameworks it needs, and I simply replace the bad undefined macro to a good one. I use the C++ code so it auto fixes SDL2's cmakelists every time I check out a new version I attached my fix in a txt file. Thanks