From 6e6c5c4cb73676f948e5bc94c89fb45c2cbc8d68 Mon Sep 17 00:00:00 2001 From: iTrooz Date: Tue, 7 Nov 2023 14:06:38 +0100 Subject: [PATCH] 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 --- cmake/build_helpers.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 0055eb308..9ce3918f3 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -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()