chore: Refactor CMakeLists.txt and app.cmake files for better organization

This commit is contained in:
scawful
2024-08-30 02:57:14 -04:00
parent 8b9a4a867f
commit 12ce96e533
10 changed files with 64 additions and 62 deletions

32
src/app/core/core.cmake Normal file
View File

@@ -0,0 +1,32 @@
set(
YAZE_APP_CORE_SRC
app/core/common.cc
app/core/controller.cc
app/core/labeling.cc
app/emu/emulator.cc
app/core/message.cc
)
if (WIN32 OR MINGW OR UNIX AND NOT APPLE)
list(APPEND YAZE_APP_CORE_SRC
app/core/platform/font_loader.cc
app/core/platform/clipboard.cc
app/core/platform/file_dialog.cc
)
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
app/core/platform/clipboard.mm
app/core/platform/file_path.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()