Add Cocoa and macOS code to CMakeLists

This commit is contained in:
scawful
2023-11-24 13:35:34 -05:00
parent 1fb3d2058a
commit 004e5917ee
3 changed files with 26 additions and 8 deletions

View File

@@ -2,7 +2,6 @@ set(
YAZE_APP_CORE_SRC
app/core/common.cc
app/core/controller.cc
app/core/pipeline.cc
)
@@ -58,6 +57,20 @@ if(WIN32 OR MINGW)
add_definitions(-DSDL_MAIN_HANDLED)
endif()
if(APPLE)
list(APPEND YAZE_APP_CORE_SRC
app/core/platform/file_dialog.mm
app/core/platform/app_delegate.mm
app/core/platform/font_loader.mm
)
find_library(COCOA_LIBRARY Cocoa)
if(NOT COCOA_LIBRARY)
message(FATAL_ERROR "Cocoa not found")
endif()
set(CMAKE_EXE_LINKER_FLAGS "-framework ServiceManagement -framework Foundation -framework Cocoa")
endif()
include(app/CMakeLists.txt)
include(cli/CMakeLists.txt)