diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index e0d773c01..66e371baf 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -264,12 +264,12 @@ macro(createPackage) set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns") set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/${BUNDLE_NAME}/Contents/Info.plist") - endif() - # Sign the bundle - find_program(CODESIGN_PATH codesign) - if (CODESIGN_PATH) - add_custom_command(TARGET imhex_all POST_BUILD COMMAND ${CODESIGN_PATH} --force --deep --sign - ${CMAKE_BINARY_DIR}/${BUNDLE_NAME}) + # Sign the bundle + find_program(CODESIGN_PATH codesign) + if (CODESIGN_PATH) + add_custom_command(TARGET imhex_all POST_BUILD COMMAND ${CODESIGN_PATH} --force --deep --sign - ${CMAKE_BINARY_DIR}/${BUNDLE_NAME}) + endif() endif() else() install(TARGETS main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})