Skip to content

Commit b39969a

Browse files
committed
CPM is a real bitch.
1 parent c1b31e5 commit b39969a

File tree

3 files changed

+95651
-27
lines changed

3 files changed

+95651
-27
lines changed

CMakeLists.txt

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ file(GLOB SOURCES
1515
src/*.hpp
1616
src/ui/*.cpp
1717
src/ui/*.hpp
18+
src/miniaudio/miniaudio.h
1819
)
1920

2021
add_library(${PROJECT_NAME} SHARED ${SOURCES})
@@ -27,30 +28,4 @@ endif()
2728

2829
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)
2930

30-
CPMAddPackage("gh:mackron/miniaudio#f40cf03")
31-
target_link_libraries(${PROJECT_NAME} miniaudio)
32-
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-
configure_file(
42-
${miniaudio_SOURCE_DIR}/miniaudio.c
43-
${CMAKE_CURRENT_BINARY_DIR}/miniaudio.mm
44-
COPYONLY
45-
)
46-
target_sources(miniaudio ${CMAKE_CURRENT_BINARY_DIR}/miniaudio.m,)
47-
target_link_libraries(miniaudio PUBLIC
48-
"-framework AudioToolbox"
49-
"-framework CoreAudio"
50-
"-framework CoreFoundation"
51-
pthread
52-
m
53-
)
54-
endif()
55-
5631
setup_geode_mod(${PROJECT_NAME})

0 commit comments

Comments
 (0)