Refactor CMake configuration for yaze_emu: add macOS support and restructure executable definition
This commit is contained in:
@@ -1,20 +1,35 @@
|
||||
add_executable(
|
||||
yaze_emu
|
||||
app/rom.cc
|
||||
app/emu/emu.cc
|
||||
${YAZE_APP_EMU_SRC}
|
||||
${YAZE_APP_CORE_SRC}
|
||||
${YAZE_APP_EDITOR_SRC}
|
||||
${YAZE_APP_GFX_SRC}
|
||||
${YAZE_APP_ZELDA3_SRC}
|
||||
${YAZE_UTIL_SRC}
|
||||
${YAZE_GUI_SRC}
|
||||
${IMGUI_SRC}
|
||||
)
|
||||
|
||||
# Yaze Emulator Standalone Application
|
||||
if (APPLE)
|
||||
list(APPEND YAZE_APP_CORE_SRC
|
||||
app/core/platform/app_delegate.mm)
|
||||
add_executable(
|
||||
yaze_emu
|
||||
MACOSX_BUNDLE
|
||||
app/main.cc
|
||||
app/rom.cc
|
||||
app/core/platform/app_delegate.mm
|
||||
${YAZE_APP_EMU_SRC}
|
||||
${YAZE_APP_CORE_SRC}
|
||||
${YAZE_APP_EDITOR_SRC}
|
||||
${YAZE_APP_GFX_SRC}
|
||||
${YAZE_APP_ZELDA3_SRC}
|
||||
${YAZE_UTIL_SRC}
|
||||
${YAZE_GUI_SRC}
|
||||
${IMGUI_SRC}
|
||||
)
|
||||
target_link_libraries(yaze_emu PUBLIC ${COCOA_LIBRARY})
|
||||
else()
|
||||
add_executable(
|
||||
yaze_emu
|
||||
app/rom.cc
|
||||
app/emu/emu.cc
|
||||
${YAZE_APP_EMU_SRC}
|
||||
${YAZE_APP_CORE_SRC}
|
||||
${YAZE_APP_EDITOR_SRC}
|
||||
${YAZE_APP_GFX_SRC}
|
||||
${YAZE_APP_ZELDA3_SRC}
|
||||
${YAZE_UTIL_SRC}
|
||||
${YAZE_GUI_SRC}
|
||||
${IMGUI_SRC}
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(
|
||||
@@ -37,7 +52,3 @@ target_link_libraries(
|
||||
ImGui
|
||||
ImGuiTestEngine
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
target_link_libraries(yaze_emu PUBLIC ${COCOA_LIBRARY})
|
||||
endif()
|
||||
Reference in New Issue
Block a user