build(cmake): replace INSTALL_BUNDLE with install component

Considering this doesn't affect the build, it has never made much sense
for it to be a build option or require rereconfiguration of the project
to change

Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
Seth Flynn 2025-07-08 11:01:50 -04:00
parent 1688db055e
commit f3b778342e
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
2 changed files with 14 additions and 20 deletions

View file

@ -405,9 +405,6 @@ if(UNIX AND APPLE)
set(Launcher_ENABLE_UPDATER YES)
endif()
# install as bundle
set(INSTALL_BUNDLE "full" CACHE STRING "Use fixup_bundle to bundle dependencies")
# Add the icon
install(FILES ${Launcher_Branding_ICNS} DESTINATION ${RESOURCES_DEST_DIR} RENAME ${Launcher_Name}.icns)
@ -418,9 +415,6 @@ elseif(UNIX)
set(LIBRARY_DEST_DIR "lib${LIB_SUFFIX}")
set(JARS_DEST_DIR "share/${Launcher_Name}")
# install as bundle with no dependencies included
set(INSTALL_BUNDLE "nodeps" CACHE STRING "Use fixup_bundle to bundle dependencies")
# Set RPATH
SET(Launcher_BINARY_RPATH "$ORIGIN/")
@ -431,11 +425,9 @@ elseif(UNIX)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/launcher/qtlogging.ini" DESTINATION "share/${Launcher_Name}")
if (INSTALL_BUNDLE STREQUAL full)
set(PLUGIN_DEST_DIR "plugins")
set(BUNDLE_DEST_DIR ".")
set(RESOURCES_DEST_DIR ".")
endif()
set(PLUGIN_DEST_DIR "plugins")
set(BUNDLE_DEST_DIR ".")
set(RESOURCES_DEST_DIR ".")
if(Launcher_ManPage)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_ManPage} DESTINATION "${KDE_INSTALL_MANDIR}/man6")
@ -451,9 +443,6 @@ elseif(WIN32)
set(PLUGIN_DEST_DIR ".")
set(RESOURCES_DEST_DIR ".")
set(JARS_DEST_DIR "jars")
# install as bundle
set(INSTALL_BUNDLE "full" CACHE STRING "Use fixup_bundle to bundle dependencies")
else()
message(FATAL_ERROR "Platform not supported")
endif()

View file

@ -1496,9 +1496,9 @@ if (UNIX AND APPLE AND Launcher_ENABLE_UPDATER)
endif()
#### The bundle mess! ####
# Bundle utilities are used to complete the portable packages - they add all the libraries that would otherwise be missing on the target system.
# Bundle utilities are used to complete packages for different platforms - they add all the libraries that would otherwise be missing on the target system.
# NOTE: it seems that this absolutely has to be here, and nowhere else.
if(INSTALL_BUNDLE STREQUAL "full")
if(WIN32 OR (UNIX AND APPLE))
if(WIN32)
set(QT_DEPLOY_TOOL_OPTIONS "--no-opengl-sw --no-quick-import --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types generic,networkinformation")
endif()
@ -1521,7 +1521,9 @@ if(INSTALL_BUNDLE STREQUAL "full")
)
# Bundle our linked dependencies
install(RUNTIME_DEPENDENCY_SET LAUNCHER_DEPENDENCY_SET
install(
RUNTIME_DEPENDENCY_SET LAUNCHER_DEPENDENCY_SET
COMPONENT bundle
DIRECTORIES
${CMAKE_SYSTEM_LIBRARY_PATH}
${QT_LIBS_DIR}
@ -1538,17 +1540,20 @@ if(INSTALL_BUNDLE STREQUAL "full")
FRAMEWORK DESTINATION ${FRAMEWORK_DEST_DIR}
)
# Deploy Qt plugins
install(SCRIPT ${QT_DEPLOY_SCRIPT})
install(
SCRIPT ${QT_DEPLOY_SCRIPT}
COMPONENT bundle
)
# Add qt.conf - this makes Qt stop looking for things outside the bundle
install(
CODE "file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${RESOURCES_DEST_DIR}/qt.conf\" \" \")"
COMPONENT Runtime
COMPONENT bundle
)
# Add qtlogging.ini as a config file
install(
FILES "qtlogging.ini"
DESTINATION ${CMAKE_INSTALL_PREFIX}/${RESOURCES_DEST_DIR}
COMPONENT Runtime
COMPONENT bundle
)
endif()