We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3625

Summary: cmakelists completly broken in latest cmake/macos/xcode combo
Product: SDL Reporter: dungaipara
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: blocker    
Priority: P2 CC: icculus, koliap
Version: don't knowKeywords: target-2.0.6
Hardware: x86_64   
OS: macOS 10.13   
Attachments: THE FIX
Possible fix

Description dungaipara 2017-04-07 18:34:48 UTC
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
Comment 1 nikolay 2017-06-08 13:54:47 UTC
Possible fix. Changed CMakelist.txt
Add frameworks based on target (osx/ios).

See SDL_Build_Bug_3625.diff attachment.
Comment 2 nikolay 2017-06-08 13:55:46 UTC
Created attachment 2755 [details]
Possible fix
Comment 3 Ryan C. Gordon 2017-08-09 05:25:36 UTC
(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.
Comment 4 Ryan C. Gordon 2017-08-16 06:01:42 UTC
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.
Comment 5 Ryan C. Gordon 2017-08-19 00:26:57 UTC
Both these issues should be fixed by https://hg.libsdl.org/SDL/rev/670978408a10 and a few patches committed before it.

--ryan.