Move Mac related stuff from the main build file
This commit is contained in:
@@ -1,3 +1,53 @@
|
||||
include_directories("./mac")
|
||||
target_sources(86Box PUBLIC "./macOSXGlue.m")
|
||||
#
|
||||
# 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
# running old operating systems and software designed for IBM
|
||||
# PC systems and compatibles from 1981 through fairly recent
|
||||
# system designs based on the PCI bus.
|
||||
#
|
||||
# This file is part of the 86Box distribution.
|
||||
#
|
||||
# CMake build script.
|
||||
#
|
||||
# Authors: dob205,
|
||||
# Jerome Vernet
|
||||
# David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
#
|
||||
# Copyright 2021 dob205.
|
||||
# Copyright 2021 Jerome Vernet.
|
||||
# Copyright 2021 David Hrdlička.
|
||||
#
|
||||
|
||||
# Pick the bundle icon depending on the release channel
|
||||
if(RELEASE_BUILD)
|
||||
set(APP_ICON_MACOSX icons/release/86Box.icns)
|
||||
elseif(BETA_BUILD)
|
||||
set(APP_ICON_MACOSX icons/beta/86Box.icns)
|
||||
elseif(ALPHA_BUILD)
|
||||
set(APP_ICON_MACOSX icons/dev/86Box.icns)
|
||||
else()
|
||||
set(APP_ICON_MACOSX icons/branch/86Box.icns)
|
||||
endif()
|
||||
|
||||
target_link_libraries(86Box "-framework AppKit")
|
||||
target_sources(86Box PRIVATE macOSXGlue.m ${APP_ICON_MACOSX})
|
||||
|
||||
# Make sure the icon is copied to the bundle
|
||||
set_source_files_properties(${APP_ICON_MACOSX}
|
||||
TARGET_DIRECTORY 86Box
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
||||
# Prepare long version string
|
||||
if(EMU_BUILD)
|
||||
set(LONG_VER_STRING "${CMAKE_PROJECT_VERSION} [${EMU_BUILD}]")
|
||||
else()
|
||||
set(LONG_VER_STRING "${CMAKE_PROJECT_VERSION}")
|
||||
endif()
|
||||
|
||||
# Generate Info.plist
|
||||
configure_file(Info.plist.in Info.plist @ONLY)
|
||||
set_target_properties(86Box
|
||||
PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES")
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-")
|
||||
#set(XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${CMAKE_CURRENT_SOURCE_DIR}/mac/codesign/dev/app.entitlements)
|
||||
@@ -7,29 +7,29 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
|
||||
<string>An emulator of old computers</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<string>86Box.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<string>net.86Box.86Box</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<string>@LONG_VER_STRING@</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<string>86Box</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<string>@CMAKE_PROJECT_VERSION@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<string>@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@.@CMAKE_PROJECT_VERSION_PATCH@.@EMU_BUILD_NUM@</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<string>© 2007-@EMU_COPYRIGHT_YEAR@ 86Box contributors</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
|
||||
Reference in New Issue
Block a user