Skip to content

Commit 01855f0

Browse files
committed
grrrrr
1 parent 7015d39 commit 01855f0

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ endif()
2828
add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode)
2929

3030
CPMAddPackage("gh:mackron/miniaudio#f40cf03")
31-
target_link_libraries(${PROJECT_NAME} miniaudio)
3231

3332
# https://miniaud.io/docs/manual/index.html
3433
# The macOS build should compile cleanly without the need to download any dependencies
@@ -38,15 +37,20 @@ target_link_libraries(${PROJECT_NAME} miniaudio)
3837
# Compiling through the command line requires linking to -lpthread and -lm.
3938

4039
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
41-
get_target_property(miniaudio_sources miniaudio SOURCES)
42-
set_source_files_properties(${miniaudio_sources} PROPERTIES LANGUAGE OBJCXX)
40+
add_library(miniaudio_objcxx INTERFACE)
41+
target_compile_options(miniaudio_objcxx INTERFACE
42+
$<$<PLATFORM_ID:Darwin>:-x objective-c++>
43+
)
44+
target_link_libraries(${PROJECT_NAME} miniaudio_objcxx)
4345
target_link_libraries(miniaudio PUBLIC
4446
"-framework AudioToolbox"
4547
"-framework CoreAudio"
4648
"-framework CoreFoundation"
4749
pthread
4850
m
4951
)
52+
else()
53+
target_link_libraries(${PROJECT_NAME} miniaudio)
5054
endif()
5155

5256
setup_geode_mod(${PROJECT_NAME})

0 commit comments

Comments
 (0)