KF5PlasmaMacros: Only try to install desktop files if they exist

The mechanism was used to make those files accessible to
KServiceTypeTrader, but that is not used anymore by KPackage.

KPackage can already handle JSON files for all its functionality,
consequently there is no reason to enforce having desktop files.
This commit is contained in:
Alexander Lohnau 2021-06-08 21:41:53 +02:00
parent 6b932130a2
commit 6e53dcc2d2
No known key found for this signature in database
GPG Key ID: 6C45BA731AA2ED36

View File

@ -33,7 +33,10 @@ macro(plasma_install_package dir component)
kpackage_install_package(${dir} ${component} ${root} ${PLASMA_RELATIVE_DATA_INSTALL_DIR} NO_DEPRECATED_WARNING)
install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME plasma-${type}-${component}.desktop)
# TODO KF6 Remove
if (EXISTS ${dir}/metadata.desktop)
install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME plasma-${type}-${component}.desktop)
endif()
endmacro()
@ -65,7 +68,10 @@ macro(plasma_install_bundled_package dir component)
kpackage_install_bundled_package(${dir} ${component} ${root} ${PLASMA_RELATIVE_DATA_INSTALL_DIR})
install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME plasma-${type}-${component}.desktop)
# TODO KF6 Remove
if (EXISTS ${dir}/metadata.desktop)
install(FILES ${dir}/metadata.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} RENAME plasma-${type}-${component}.desktop)
endif()
endmacro()