Improve handling configuration suffix
* Use configuration suffix when installing icons * Include configuration name suffix in application name This way differently configured versions of the same applications should be co-installable within the same prefix. That is useful to install the Qt 6 version of an application alongside the Qt 5 version.
This commit is contained in:
parent
e2f170ddd5
commit
3a8ae77477
|
@ -114,7 +114,7 @@ set(META_APP_DESCRIPTION "Useful C++ classes and routines such as argument parse
|
|||
set(META_FEATURES_FOR_COMPILER_DETECTION_HEADER cxx_thread_local)
|
||||
set(META_VERSION_MAJOR 5)
|
||||
set(META_VERSION_MINOR 7)
|
||||
set(META_VERSION_PATCH 0)
|
||||
set(META_VERSION_PATCH 1)
|
||||
|
||||
# find required 3rd party libraries
|
||||
include(3rdParty)
|
||||
|
|
|
@ -135,8 +135,11 @@ if (NOT META_NO_INSTALL_TARGETS AND ENABLE_INSTALL_TARGETS)
|
|||
endforeach ()
|
||||
|
||||
foreach (ICON_FILE ${ICON_FILES})
|
||||
get_filename_component(ICON_FILE_NAME "${ICON_FILE}" NAME_WE)
|
||||
get_filename_component(ICON_FILE_EXT "${ICON_FILE}" EXT)
|
||||
install(
|
||||
FILES "${ICON_FILE}"
|
||||
RENAME "${ICON_FILE_NAME}${META_CONFIG_SUFFIX}${ICON_FILE_EXT}"
|
||||
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
|
||||
COMPONENT desktop)
|
||||
endforeach ()
|
||||
|
@ -243,7 +246,7 @@ function (add_desktop_file)
|
|||
DESKTOP_FILE_CMD
|
||||
"${META_TARGET_NAME}"
|
||||
DESKTOP_FILE_ICON
|
||||
"${META_PROJECT_NAME}"
|
||||
"${META_PROJECT_NAME}${META_CONFIG_SUFFIX}"
|
||||
DESKTOP_FILE_ADDITIONAL_ENTRIES
|
||||
"${DESKTOP_FILE_ADDITIONAL_ENTRIES}")
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ endif ()
|
|||
if (META_CONFIG_NAME)
|
||||
set(META_CONFIG_PREFIX "${META_CONFIG_NAME}-")
|
||||
set(META_CONFIG_SUFFIX "-${META_CONFIG_NAME}")
|
||||
set(META_APP_NAME "${META_APP_NAME} (${META_CONFIG_NAME})")
|
||||
endif ()
|
||||
|
||||
# allow setting a library/application target suffix - A different configuration name might not require a different target
|
||||
|
|
Loading…
Reference in New Issue