use installPackage

This commit is contained in:
Marco Martin 2013-02-04 16:48:37 +01:00
parent 274e4372c5
commit fef1e3f0e7
3 changed files with 10 additions and 5 deletions

View File

@ -191,6 +191,15 @@ set(KCONFIG_KCFGC_EXECUTABLE kconfig_compiler)
include(KConfigMacros) include(KConfigMacros)
MACRO(installPackage dir component)
SET(root ${ARGN})
IF(NOT root)
SET(root plasma/plasmoids)
ENDIF(NOT root)
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)
ENDMACRO(installPackage)
################# list the subdirectories ################# ################# list the subdirectories #################
add_subdirectory( declarativeimports ) add_subdirectory( declarativeimports )

View File

@ -51,4 +51,4 @@ target_link_libraries(testplasma2
install(TARGETS testplasma2 ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS testplasma2 ${INSTALL_TARGETS_DEFAULT_ARGS})
add_subdirectory(qmlpackages) add_subdirectory(qmlpackages)
add_subdirectory(testcontainment) installPackage(testcontainment org.kde.testcontainment)

View File

@ -1,4 +0,0 @@
install(DIRECTORY . DESTINATION ${DATA_INSTALL_DIR}/plasma/packages/org.kde.testcontainment PATTERN .svn EXCLUDE PATTERN CMakeLists.txt EXCLUDE PATTERN Messages.sh EXCLUDE)