Welcome to The Bug Genie
Please fill in your username and password below, and press "Continue" to log in.If you have not already registered, please use the "Register new account" tab to do so.
Please wait while updating issue type...
Could not save your changes
This issue has been changed since you started editing it
Data that has been changed is highlighted in red below. Undo your changes to see the updated information
You have changed this issue, but haven't saved your changes yet. To save it, press the Save changes button to the right
This issue is blocking the next release
This issue has been closed with status "Fixed" and resolution "RESOLVED".
Create a comment There are no comments
There is nothing attached to this issue
This issue has no duplicates
46d05de
Jul 14, 00:05 - Preceeded by e8a105932a2ff3e548cab183da17a91e1c7f6b69
Log entry
CMake: Remove hack to always link SDLmain on OS X If SDLmain isn't found by FindSDL.cmake, there are bigger problems that need to be fixed elsewhere. Fixes: bug #517 (hopefully once and for all) Changed files
Affected issues
46d05de
Jul 14, 00:05 - Preceeded by e8a105932a2ff3e548cab183da17a91e1c7f6b69
Log entry
CMake: Remove hack to always link SDLmain on OS X If SDLmain isn't found by FindSDL.cmake, there are bigger problems that need to be fixed elsewhere. Fixes: bug #517 (hopefully once and for all) Changed files
Affected issues
|
|||||||||||||||||||||||||||||||||||||
Really delete this comment?
Really delete this comment?
Is the INCLUDE_DIRECTORIES(/opt/local/include) really needed? The include directory for SDL headers should already have been found by SDL as ${SDL_INCLUDE_DIR}. Do you perhaps have have two SDL intallations and the one CMake finds doesn't have SDL_main.h. What happens if you replace #include <SDL_main.h> with #include <SDL.h> in src/core/Startup.cpp - or does that just bring back Crash report 514 - Crash on Mac OS X at start?
As for LINK_DIRECTORIES(/opt/local/lib), the FindSDL CMake module should also find the full path to the SDLmain library. However it seems we for it to link to SDLmain on OS X, which is most likely wrong, at least without first using find_library. What happends if you remove the list(APPEND SDL_LIBRARIES "SDLmain") line in CMakeLists.txt?
The comments in FindSDL.cmake have this to say:
It seems that SDL for OS X is distributed in two variants - the official framework version that requires projects to manually include SDL_main.h and SDL_main.m in their sources (hey, SDL devs, who though this was an acceptable solution) and the macports/whatever version that provides libSDLmain.h.
So our CMakeLists.txt at this point works with the non-framework version, but not with the .framework version -- and it also breaks if both are installed :S
Is there a way we can fix this for the .framwework version without including SDL_main.m in our source tree? Is there an SDL_main.m in the SDL.framework and (how) can we tell CMake to use it? I really don't know much about OS X frameworks.
Thankfully it looks like SDLmain is gone in SDL 2.0 (1), so this will fix itself when we move to that.
(1) http://lists.libsdl.org/pipermail/sdl-libsdl.org/2012-November/086414.html
Really delete this comment?
cake output:
looks like cmake found it
but compiler still cant find it
Really delete this comment?
Really delete this comment?
Really delete this comment?
I removed the offending code from CMakeLists.txt - is everything working OK now?
Linking will probably still not work with the .framework version, but it's probably best to just wait for SDL 2 to fix that as I have no way to test it.
Really delete this comment?
Really delete this comment?
Really delete this comment?
The issue was updated with the following change(s):
Really delete this comment?