1
0
mirror of synced 2024-11-12 02:00:52 +01:00

build: Don't try to bundle updater on targets that don't have an updater

This commit is contained in:
WerWolv 2023-12-28 20:44:42 +01:00
parent 2d7a6a7cb5
commit db72ba295a

View File

@ -255,6 +255,7 @@ macro(createPackage)
install(TARGETS main BUNDLE DESTINATION ".") install(TARGETS main BUNDLE DESTINATION ".")
install(TARGETS updater BUNDLE DESTINATION ".") install(TARGETS updater BUNDLE DESTINATION ".")
install(FILES $<TARGET_FILE:main> DESTINATION "${IMHEX_BUNDLE_PATH}") install(FILES $<TARGET_FILE:main> DESTINATION "${IMHEX_BUNDLE_PATH}")
install(FILES $<TARGET_FILE:updater> DESTINATION "${IMHEX_BUNDLE_PATH}")
# Update library references to make the bundle portable # Update library references to make the bundle portable
postprocess_bundle(imhex_all main) postprocess_bundle(imhex_all main)
@ -266,8 +267,10 @@ macro(createPackage)
set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/imhex.app/Contents/Info.plist") set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/imhex.app/Contents/Info.plist")
else() else()
install(TARGETS main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS updater RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) if (TARGET updater)
if(WIN32) # Forwarder is only needed on Windows install(TARGETS updater RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
if (TARGET main-forwarder)
install(TARGETS main-forwarder BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS main-forwarder BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()
endif() endif()