Fix up library finding

* Generate and install and include PlasmaTargets.cmake file
* set Plasma_LIBRARIES to KF5::plasma

-> kde-workspace build works for me.
This commit is contained in:
Sebastian Kügler 2013-06-13 16:01:06 +02:00
parent d492584d39
commit 22d261759b
3 changed files with 9 additions and 4 deletions

View File

@ -176,12 +176,11 @@ install(FILES
COMPONENT Devel COMPONENT Devel
) )
# install(EXPORT plasmaTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
# FILE plasmaTargets.cmake COMPONENT Devel)
################# list the subdirectories ################# ################# list the subdirectories #################
add_subdirectory(src) add_subdirectory(src)
add_subdirectory( desktoptheme ) add_subdirectory( desktoptheme )
# install(EXPORT plasmaTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
# FILE plasmaTargets.cmake COMPONENT Devel)
install(EXPORT PlasmaTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE PlasmaTargets.cmake NAMESPACE KF5:: COMPONENT Devel)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

View File

@ -2,7 +2,11 @@
# Any changes in this ".cmake" file will be overwritten by CMake, the source is the ".cmake.in" file. # Any changes in this ".cmake" file will be overwritten by CMake, the source is the ".cmake.in" file.
include("${CMAKE_CURRENT_LIST_DIR}/PlasmaTargets.cmake")
set(Plasma_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@") 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@")
set(Plasma_LIBRARIES KF5::plasma)
include("${CMAKE_CURRENT_LIST_DIR}/PlasmaMacros.cmake") include("${CMAKE_CURRENT_LIST_DIR}/PlasmaMacros.cmake")

View File

@ -233,3 +233,5 @@ install(FILES data/operations/dataengineservice.operations DESTINATION ${DATA_IN
install(FILES data/operations/plasmoidservice.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services) install(FILES data/operations/plasmoidservice.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services)
install(FILES data/operations/storage.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services) install(FILES data/operations/storage.operations DESTINATION ${DATA_INSTALL_DIR}/plasma/services)
install(TARGETS plasma EXPORT PlasmaTargets ${INSTALL_TARGETS_DEFAULT_ARGS})