plasma-framework/PlasmaMacros.cmake
Sebastian Kügler d492584d39 Clean up macro usage
exclusively use the installPackage definition from PlasmaMacros.cmake
2013-06-13 02:19:37 +02:00

17 lines
545 B
CMake

find_package(KF5 MODULE REQUIRED COMPONENTS InstallDirs)
macro(installPackage dir component)
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 .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE)
install(FILES ${dir}/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME plasma-${type}-${component}.desktop)
endmacro()