fixed macos bundling (thanks to @dob205)
This commit is contained in:
@@ -129,6 +129,10 @@ if(APPLE)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(QT)
|
||||||
|
find_package(Qt5 COMPONENTS Core Widgets REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Freetype REQUIRED)
|
find_package(Freetype REQUIRED)
|
||||||
include_directories(${FREETYPE_INCLUDE_DIRS})
|
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
@@ -189,14 +193,28 @@ else()
|
|||||||
install(TARGETS 86Box)
|
install(TARGETS 86Box)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# adjustments for macOS app bundles
|
# adjustments for macOS app bundles
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(APPS ${CMAKE_CURRENT_BINARY_DIR}/86Box.app)
|
set(APPS ${CMAKE_CURRENT_BINARY_DIR}/86Box.app)
|
||||||
install(CODE "
|
install(CODE "
|
||||||
|
include(InstallRequiredSystemLibraries)
|
||||||
include(BundleUtilities)
|
include(BundleUtilities)
|
||||||
fixup_bundle(\"${APPS}\" \"\" \"\")"
|
fixup_bundle(\"${APPS}\" \"\" \"\")"
|
||||||
COMPONENT Runtime)
|
COMPONENT Runtime)
|
||||||
|
|
||||||
|
# needed for Qt packaging
|
||||||
|
# get the macdeployqt path
|
||||||
|
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
|
||||||
|
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
|
||||||
|
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
|
||||||
|
|
||||||
|
# excecute macdeployqt
|
||||||
|
add_custom_command(TARGET 86Box POST_BUILD
|
||||||
|
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
|
||||||
|
"$<TARGET_FILE_DIR:86Box>/../.."
|
||||||
|
-always-overwrite
|
||||||
|
COMMENT "Running macdeployqt..."
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(VCPKG_TOOLCHAIN)
|
if(VCPKG_TOOLCHAIN)
|
||||||
@@ -221,12 +239,12 @@ add_subdirectory(sio)
|
|||||||
add_subdirectory(scsi)
|
add_subdirectory(scsi)
|
||||||
add_subdirectory(sound)
|
add_subdirectory(sound)
|
||||||
add_subdirectory(video)
|
add_subdirectory(video)
|
||||||
|
if (APPLE)
|
||||||
|
add_subdirectory(mac)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (QT)
|
if (QT)
|
||||||
add_subdirectory(qt)
|
add_subdirectory(qt)
|
||||||
elseif(APPLE)
|
|
||||||
add_subdirectory(mac)
|
|
||||||
add_subdirectory(unix)
|
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
add_subdirectory(win)
|
add_subdirectory(win)
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user