Make installPackage cmake macro useful for other package types
Make it possible to install any type into any path prefix. We just add an optional argument to also specify the type, so from now on installed service files will not all be plasma-applet-<pluginname>.desktop, but for example plasma-wallpaper-<pluginname>.desktop. CCMAIL:plasma-devel@kde.org
This commit is contained in:
parent
db5ef57480
commit
b679eb6dab
@ -146,12 +146,16 @@ configure_file(config-compiler.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-compil
|
||||
|
||||
|
||||
macro(installPackage dir component)
|
||||
set(root ${ARGN})
|
||||
set(root ${ARGV2})
|
||||
set(type ${ARGV3})
|
||||
if(NOT root)
|
||||
set(root plasma/plasmoids)
|
||||
endif()
|
||||
if(NOT type)
|
||||
set(type applet)
|
||||
endif()
|
||||
install(DIRECTORY ${dir}/ DESTINATION ${DATA_INSTALL_DIR}/${root}/${component} PATTERN Messages.sh EXCLUDE)
|
||||
install(FILES ${dir}/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME plasma-applet-${component}.desktop)
|
||||
install(FILES ${dir}/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME plasma-${type}-${component}.desktop)
|
||||
endmacro()
|
||||
|
||||
################# list the subdirectories #################
|
||||
|
Loading…
Reference in New Issue
Block a user