Enhance CMake configuration for macOS and emulator build

- Added checks to conditionally set the DMG background image and DS Store setup script only if the files exist, improving robustness in packaging.
- Updated the emulator build configuration to skip unnecessary steps in minimal builds, ensuring cleaner builds and better resource management.
- Streamlined target include directories and linking for the emulator, maintaining modularity and clarity in the CMake setup.
This commit is contained in:
scawful
2025-09-26 17:37:49 -04:00
parent a53e759043
commit 9e3a5778aa
2 changed files with 40 additions and 33 deletions

View File

@@ -64,8 +64,12 @@ elseif(APPLE)
set(CPACK_PACKAGE_FILE_NAME "yaze-${CPACK_PACKAGE_VERSION}-macos")
# macOS app bundle configuration
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/assets/dmg_background.png")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_SOURCE_DIR}/cmake/dmg_setup.scpt")
if(EXISTS "${CMAKE_SOURCE_DIR}/assets/dmg_background.png")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/assets/dmg_background.png")
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/cmake/dmg_setup.scpt")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_SOURCE_DIR}/cmake/dmg_setup.scpt")
endif()
elseif(UNIX)
# Linux DEB/RPM configuration