Clean up macro usage

exclusively use the installPackage definition from PlasmaMacros.cmake
This commit is contained in:
Sebastian Kügler 2013-06-13 02:19:37 +02:00
parent 1156d89fce
commit d492584d39
3 changed files with 1 additions and 32 deletions

View File

@ -137,7 +137,7 @@ if(QCA2_FOUND)
) )
endif() endif()
include(PlasmaMacros.cmake)
################# configure checks and create the configured files ################# ################# configure checks and create the configured files #################
@ -145,20 +145,6 @@ endif()
configure_file(config-prefix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-prefix.h ) configure_file(config-prefix.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-prefix.h )
configure_file(config-compiler.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-compiler.h ) configure_file(config-compiler.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-compiler.h )
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()
################ create PlasmaConfig.cmake and install it ########################### ################ create PlasmaConfig.cmake and install it ###########################
@ -194,15 +180,6 @@ install(FILES
# FILE plasmaTargets.cmake COMPONENT Devel) # FILE plasmaTargets.cmake COMPONENT Devel)
# install(FILES
# "${CMAKE_CURRENT_SOURCE_DIR}/PlasmaMacros.cmake"
# "FindPlasma.cmake"
# DESTINATION
# ${DATA_INSTALL_DIR}/cmake/modules
# )
################# list the subdirectories ################# ################# list the subdirectories #################
add_subdirectory(src) add_subdirectory(src)
add_subdirectory( desktoptheme ) add_subdirectory( desktoptheme )

View File

@ -6,9 +6,3 @@ set(Plasma_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set_and_check(Plasma_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") set_and_check(Plasma_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
include("${CMAKE_CURRENT_LIST_DIR}/PlasmaMacros.cmake") include("${CMAKE_CURRENT_LIST_DIR}/PlasmaMacros.cmake")
macro(fsck)
message("FSCK!!!!")
endmacro()

View File

@ -1,6 +1,4 @@
find_package(KF5 MODULE REQUIRED COMPONENTS InstallDirs) find_package(KF5 MODULE REQUIRED COMPONENTS InstallDirs)
macro(installPackage dir component) macro(installPackage dir component)