File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,32 @@ add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)
3030CPMAddPackage("gh:mackron/miniaudio#f40cf03" )
3131target_link_libraries (${PROJECT_NAME} miniaudio)
3232
33+ # https://miniaud.io/docs/manual/index.html
34+ # The macOS build should compile cleanly without the need to download any dependencies
35+ # nor link to any libraries or frameworks.
36+ # The iOS build needs to be compiled as Objective-C and will need to link the relevant frameworks
37+ # but should compile cleanly out of the box with Xcode.
38+ # Compiling through the command line requires linking to -lpthread and -lm.
39+
40+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "iOS" OR IOS)
41+ add_library (miniaudio STATIC ${miniaudio_SOURCE_DIR} /miniaudio.c)
42+ target_include_directories (miniaudio PUBLIC ${miniaudio_SOURCE_DIR} )
43+ set_source_files_properties (${miniaudio_SOURCE_DIR} /miniaudio.c PROPERTIES LANGUAGE OBJC)
44+ target_link_libraries (miniaudio PUBLIC
45+ "-framework AudioToolbox"
46+ "-framework AVFoundation"
47+ "-framework CoreAudio"
48+ "-framework CoreFoundation"
49+ "-framework CoreGraphics"
50+ "-framework CoreMedia"
51+ "-framework Foundation"
52+ "-framework MediaPlayer"
53+ "-framework OpenGLES"
54+ "-framework QuartzCore"
55+ "-framework UIKit"
56+ pthread
57+ m
58+ )
59+ endif ()
60+
3361setup_geode_mod(${PROJECT_NAME} )
You can’t perform that action at this time.
0 commit comments