Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,17 @@ if(PLATFORM STREQUAL "desktop")
target_include_directories(butterscotch PRIVATE ${SDL3_INCLUDE_DIRS})
target_link_directories(butterscotch PRIVATE ${SDL3_LIBRARY_DIRS})
set(BACKEND_LIBRARIES ${SDL3_LIBRARIES})
elseif(DESKTOP_BACKEND STREQUAL "appkit")
add_compile_definitions(USE_APPKIT)
target_compile_definitions(butterscotch PRIVATE GL_SILENCE_DEPRECATION)
set(BACKEND_LIBRARIES "-framework Cocoa")
endif()
target_link_libraries(butterscotch PRIVATE ${BACKEND_LIBRARIES} ${AUDIO_LIBRARIES} ${PLATFORM_LIBRARIES})
target_sources(butterscotch PRIVATE src/desktop/backends/${DESKTOP_BACKEND}.c)
if(DESKTOP_BACKEND STREQUAL "appkit")
target_sources(butterscotch PRIVATE src/desktop/backends/${DESKTOP_BACKEND}.m)
else()
target_sources(butterscotch PRIVATE src/desktop/backends/${DESKTOP_BACKEND}.c)
endif()

# Enable AddressSanitizer by default in Debug builds
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down
Loading
Loading