1
0
mirror of synced 2024-11-12 10:10:53 +01:00

build: Fix build script for MacOS (#1404)

Fix build problem introduced by
https://github.com/WerWolv/ImHex/pull/1398
I didn't refactor the code well because I thought `CREATE_PACKAGE` was
an option only used for Windows, when it needs to be used for MacOS too
This commit is contained in:
iTrooz 2023-11-07 14:06:38 +01:00 committed by GitHub
parent 669e1921a4
commit 6e6c5c4cb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,6 +257,9 @@ macro(createPackage)
# Enforce DragNDrop packaging.
set(CPACK_GENERATOR "DragNDrop")
set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns" )
set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist")
else()
install(TARGETS main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if(WIN32) # Forwarder is only needed on Windows
@ -264,10 +267,8 @@ macro(createPackage)
endif()
endif()
if (IMHEX_GENERATE_PACKAGE AND WIN32)
if (IMHEX_GENERATE_PACKAGE)
set (CPACK_BUNDLE_NAME "ImHex")
set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns" )
set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist")
include(CPack)
endif()