(macOS) Some CMake improvements.

This commit is contained in:
Leon Styhre 2021-04-07 18:32:22 +02:00
parent 898a66aa14
commit 8d55a163ca
3 changed files with 15 additions and 5 deletions

View file

@ -1,4 +1,9 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
if(APPLE)
# Set this to the operating system version you're building on, and also update
# es-app/assets/EmulationStation-DE_Info.plist accordingly.
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "macOS deployment target")
endif()
project(emulationstation-de) project(emulationstation-de)
# Set this to ON to show verbose compiler output (e.g. compiler flags, include directories etc.) # Set this to ON to show verbose compiler output (e.g. compiler flags, include directories etc.)
@ -157,8 +162,8 @@ if(APPLE)
endif() endif()
if(APPLE) if(APPLE)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_GREATER 10.13) if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.14)
message("-- macOS version 10.14 or higher detected so if code signing is enabled, Hardened Runtime will be used") message("-- macOS version 10.13 or lower has been set, so if code signing is enabled, Hardened Runtime will not be used")
endif() endif()
endif() endif()

View file

@ -244,9 +244,14 @@ endif()
# Settings per operating system and generator type. # Settings per operating system and generator type.
if(APPLE) if(APPLE)
set(CPACK_GENERATOR "Bundle") set(CPACK_GENERATOR "Bundle")
set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}") if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.14)
set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}_legacy")
set(CPACK_DMG_VOLUME_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}_legacy")
else()
set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}")
set(CPACK_DMG_VOLUME_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}")
endif()
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns") set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns")
set(CPACK_DMG_VOLUME_NAME "EmulationStation Desktop Edition ${CPACK_PACKAGE_VERSION}")
set(CPACK_DMG_DS_STORE "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_DS_Store") set(CPACK_DMG_DS_STORE "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_DS_Store")
set(CPACK_BUNDLE_NAME "EmulationStation Desktop Edition") set(CPACK_BUNDLE_NAME "EmulationStation Desktop Edition")
set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns") set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns")

View file

@ -21,7 +21,7 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0.0-rc</string> <string>1.0.0-rc</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>10.11.0</string> <string>10.14.0</string>
<key>LSUIPresentationMode</key> <key>LSUIPresentationMode</key>
<integer>3</integer> <integer>3</integer>
<key>NSHighResolutionCapable</key> <key>NSHighResolutionCapable</key>