Add Cocoa and macOS code to CMakeLists
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user