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 2732

Summary: cmake fixes
Product: SDL Reporter: Ozkan Sezer <sezeroz>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 2.0Keywords: triage-2.0.4
Hardware: All   
OS: All   
Attachments: cmake fixes for sdl2 (against current hg)
updated cmake fixes patch

Description Ozkan Sezer 2014-09-19 16:59:07 UTC
Created attachment 1872 [details]
cmake fixes for sdl2 (against current hg)

Noticed a few broken places in the SDL2 cmake'ry while cross-compiling
for osx on Linux, by comparison to the configury, and made the attached
small patch addressing them.

- SDL_AUDIO_DRIVER_COREAUDIO wasn't set along with MACOSX_COREAUDIO
- Only the private HAVE_LIBICONV was set, the public HAVE_ICONV was not
- Functions acos() and asin() weren't checked
- alloca() and alloca.h weren't checked
- HAVE_PTHREAD_SETNAME_NP and HAVE_PTHREAD_SET_NAME_NP variable names
  were borked (were partially lowercased and didn't go into generated
  config.h)
- check_c_source_runs() for pthreads isn't cross-compile-friendly:
  (worked around by setting HAVE_PTHREADS to 1 if PTHREADS is set and
  cross-compiling, allowing the run test for non-cross-compile cases.)

Do note that dylib versioning was broken for me: the cmake'ry does
-current_version 0.4.0 during linkage, however configury+libtool does
-compatibility_version 5 -current_version 5.0
Therefore, if I compile using configury, link an app against it, then
replace the sdl2 lib by a one compiled by cmake: it refuses to load 
saying that the app requires version 5 but the available lib offers
version 0. This needs fixing (by some one other than me..)
Comment 1 Ozkan Sezer 2015-01-18 08:38:25 UTC
Created attachment 1993 [details]
updated cmake fixes patch

Attached updated patch to apply cleanly against today's hg.
Comment 2 Ryan C. Gordon 2015-02-19 05:22:22 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
Comment 3 Ryan C. Gordon 2015-03-21 01:59:10 UTC
This patch is now https://hg.libsdl.org/SDL/rev/669bf9fb901e, thanks!

--ryan.