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 5407 - SDL2 does not build on MacOS
Summary: SDL2 does not build on MacOS
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.14
Hardware: x86_64 Mac OS X (All)
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-20 18:30 UTC by Jason
Modified: 2020-12-20 18:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason 2020-12-20 18:30:25 UTC
Using the latest development version, building SDL is failing on MacOS 11 because CMake is not including the files under "src/joystick/darwin/*"


My solution was to update lines 1704 and 1705 of CMakeLists.txt from

file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m)

to

file(GLOB JOYSTICK_SOURCES "${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c" "${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m")
Comment 1 Ozkan Sezer 2020-12-20 18:55:18 UTC
Should be fixed by https://hg.libsdl.org/SDL/rev/54718b074123
If not, please drop a note here.