Add KF5 prefix to plasma framework

This changes the lib name and package names to follow other frameworks

libFoo -> libKF5Foo
find_package(KFoo) -> find_package(KF5Foo)

REVIEW: 114389
This commit is contained in:
Martin Klapetek 2013-12-11 12:39:48 +01:00
parent 98df4984d0
commit 3214bd8132
20 changed files with 52 additions and 50 deletions

View File

@ -2,11 +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") include("${CMAKE_CURRENT_LIST_DIR}/KF5PlasmaTargets.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) set(Plasma_LIBRARIES KF5::Plasma)
include("${CMAKE_CURRENT_LIST_DIR}/PlasmaMacros.cmake") include("${CMAKE_CURRENT_LIST_DIR}/KF5PlasmaMacros.cmake")

View File

@ -7,7 +7,7 @@ kservice_desktop_to_json(plasma-dataengine-example-customDataContainers.desktop)
add_library(plasma_dataengine_example_customDataContainers MODULE ${customDataContainers_SRCS}) add_library(plasma_dataengine_example_customDataContainers MODULE ${customDataContainers_SRCS})
target_link_libraries(plasma_dataengine_example_customDataContainers target_link_libraries(plasma_dataengine_example_customDataContainers
Plasma KF5::Plasma
KF5::KIOCore KF5::KIOCore
KF5::KService KF5::KService
) )

View File

@ -7,7 +7,7 @@ kservice_desktop_to_json(plasma-dataengine-example-simpleEngine.desktop)
add_library(plasma_dataengine_example_simpleEngine MODULE ${simpleEngine_SRCS}) add_library(plasma_dataengine_example_simpleEngine MODULE ${simpleEngine_SRCS})
target_link_libraries(plasma_dataengine_example_simpleEngine target_link_libraries(plasma_dataengine_example_simpleEngine
Plasma KF5::Plasma
KF5::KService KF5::KService
KF5::KI18n KF5::KI18n
) )

View File

@ -7,7 +7,7 @@ kservice_desktop_to_json(plasma-dataengine-example-sourcesOnRequest.desktop)
add_library(plasma_dataengine_example_sourcesOnRequest MODULE ${sourcesOnRequest_SRCS}) add_library(plasma_dataengine_example_sourcesOnRequest MODULE ${sourcesOnRequest_SRCS})
target_link_libraries(plasma_dataengine_example_sourcesOnRequest target_link_libraries(plasma_dataengine_example_sourcesOnRequest
Plasma KF5::Plasma
KF5::KService KF5::KService
) )

View File

@ -37,7 +37,7 @@ target_link_libraries(corebindingsplugin
KF5::KCoreAddons KF5::KCoreAddons
KF5::KIconThemes KF5::KIconThemes
KF5::KWindowSystem KF5::KWindowSystem
Plasma) KF5::Plasma)
if(X11_FOUND) if(X11_FOUND)
target_link_libraries(corebindingsplugin ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} ) target_link_libraries(corebindingsplugin ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} )

View File

@ -12,7 +12,7 @@ add_executable(sortfiltermodeltest
) )
target_link_libraries(sortfiltermodeltest target_link_libraries(sortfiltermodeltest
Plasma KF5::Plasma
Qt5::Gui Qt5::Gui
Qt5::Test Qt5::Test
KF5::KI18n KF5::KI18n

View File

@ -10,10 +10,9 @@ target_link_libraries(runnermodelplugin
Qt5::Quick Qt5::Quick
Qt5::Qml Qt5::Qml
KF5::KI18n KF5::KI18n
Plasma KF5::Plasma
) )
install(TARGETS runnermodelplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/runnermodel) install(TARGETS runnermodelplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/runnermodel)
install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/runnermodel) install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/runnermodel)

View File

@ -21,7 +21,7 @@ target_link_libraries(plasmacomponentsplugin
Qt5::Qml Qt5::Qml
Qt5::Gui Qt5::Gui
KF5::KDeclarative KF5::KDeclarative
Plasma) KF5::Plasma)
install(TARGETS plasmacomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/components) install(TARGETS plasmacomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/components)

View File

@ -20,7 +20,7 @@ target_link_libraries(plasmaextracomponentsplugin
Qt5::Quick Qt5::Quick
Qt5::Qml Qt5::Qml
${KACTIVITIES_LIBRARY} ${KACTIVITIES_LIBRARY}
Plasma) KF5::Plasma)
install(TARGETS plasmaextracomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/extras) install(TARGETS plasmaextracomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/extras)

View File

@ -20,7 +20,7 @@ target_link_libraries(qtextracomponentsplugin
Qt5::Gui Qt5::Gui
KF5::KDeclarative KF5::KDeclarative
KF5::KIconThemes KF5::KIconThemes
Plasma) KF5::Plasma)
install(TARGETS qtextracomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/qtextracomponents) install(TARGETS qtextracomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/qtextracomponents)

View File

@ -111,10 +111,10 @@ kconfig_add_kcfg_files(Plasma_LIB_SRCS data/kconfigxt/libplasma-theme-global.kcf
#) #)
add_library(Plasma ${Plasma_LIB_SRCS}) add_library(KF5Plasma ${Plasma_LIB_SRCS})
add_library(KF5::Plasma ALIAS Plasma) add_library(KF5::Plasma ALIAS KF5Plasma)
target_link_libraries(Plasma target_link_libraries(KF5Plasma
Qt5::Network Qt5::Network
Qt5::Sql Qt5::Sql
Qt5::Quick # needed in service.cpp, remove? Qt5::Quick # needed in service.cpp, remove?
@ -140,25 +140,26 @@ target_link_libraries(Plasma
) )
if(X11_FOUND) if(X11_FOUND)
target_link_libraries(Plasma Qt5::X11Extras ${X11_LIBRARIES}) target_link_libraries(KF5Plasma Qt5::X11Extras ${X11_LIBRARIES})
endif() endif()
if(DL_LIBRARY) if(DL_LIBRARY)
target_link_libraries(Plasma ${DL_LIBRARY}) target_link_libraries(KF5Plasma ${DL_LIBRARY})
endif() endif()
target_link_libraries(Plasma LINK_INTERFACE_LIBRARIES Qt5::Widgets KF5::KConfigWidgets) target_link_libraries(KF5Plasma LINK_INTERFACE_LIBRARIES Qt5::Widgets KF5::KConfigWidgets)
target_include_directories(Plasma PUBLIC target_include_directories(KF5Plasma PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..;${CMAKE_CURRENT_BINARY_DIR}/..;${CMAKE_CURRENT_SOURCE_DIR}/includes>" "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..;${CMAKE_CURRENT_BINARY_DIR}/..;${CMAKE_CURRENT_SOURCE_DIR}/includes>"
) )
target_include_directories(Plasma INTERFACE target_include_directories(KF5Plasma INTERFACE
"$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR};${INCLUDE_INSTALL_DIR}/KDE>" "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR};${INCLUDE_INSTALL_DIR}/KDE>"
) )
#do NOT use GENERIC versioning -- the Plasma team will take care of versioning #do NOT use GENERIC versioning -- the Plasma team will take care of versioning
set_target_properties(Plasma PROPERTIES set_target_properties(KF5Plasma PROPERTIES
VERSION 5.0.0 VERSION 5.0.0
SOVERSION 5 SOVERSION 5
EXPORT_NAME Plasma
) )
########### install files ############### ########### install files ###############
@ -225,5 +226,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}) install(TARGETS KF5Plasma EXPORT KF5PlasmaTargets ${INSTALL_TARGETS_DEFAULT_ARGS})

View File

@ -10,7 +10,7 @@ MACRO(PLASMA_UNIT_TESTS)
FOREACH(_testname ${ARGN}) FOREACH(_testname ${ARGN})
add_executable(${_testname} ${_testname}.cpp) add_executable(${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} Qt5::Test Qt5::Declarative target_link_libraries(${_testname} Qt5::Test Qt5::Declarative
Plasma KF5::KArchive KF5::KCoreAddons KF5::Plasma KF5::KArchive KF5::KCoreAddons
KF5::KConfigGui KF5::KConfigGui
KF5::KI18n KF5::KI18n
KF5::KIOCore KF5::KIOCore
@ -32,7 +32,7 @@ PLASMA_UNIT_TESTS(
) )
add_executable(storagetest storagetest.cpp ../private/storage.cpp ../private/storagethread.cpp) add_executable(storagetest storagetest.cpp ../private/storage.cpp ../private/storagethread.cpp)
target_link_libraries(storagetest Qt5::Test Qt5::Declarative Qt5::Sql KF5::KIOCore Plasma KF5::KCoreAddons ) target_link_libraries(storagetest Qt5::Test Qt5::Declarative Qt5::Sql KF5::KIOCore KF5::Plasma KF5::KCoreAddons )
add_test(plasma-storagetest storagetest) add_test(plasma-storagetest storagetest)
ecm_mark_as_test(storagetest) ecm_mark_as_test(storagetest)

View File

@ -5,7 +5,7 @@ add_executable(plugintest
plugintest.cpp plugintest.cpp
) )
target_link_libraries(plugintest Plasma KF5::KI18n KF5::KService Qt5::DBus) target_link_libraries(plugintest KF5::Plasma KF5::KI18n KF5::KService Qt5::DBus)
message("INSTALL_TARGETS_DEFAULT_ARGS ${INSTALL_TARGETS_DEFAULT_ARGS}") message("INSTALL_TARGETS_DEFAULT_ARGS ${INSTALL_TARGETS_DEFAULT_ARGS}")

View File

@ -5,7 +5,7 @@ add_executable(plasmapkg
plasmapkg.cpp plasmapkg.cpp
) )
target_link_libraries(plasmapkg Plasma KF5::KI18n KF5::KService KF5::KCoreAddons Qt5::DBus) target_link_libraries(plasmapkg KF5::Plasma KF5::KI18n KF5::KService KF5::KCoreAddons Qt5::DBus)
message("INSTALL_TARGETS_DEFAULT_ARGS ${INSTALL_TARGETS_DEFAULT_ARGS}") message("INSTALL_TARGETS_DEFAULT_ARGS ${INSTALL_TARGETS_DEFAULT_ARGS}")

View File

@ -8,9 +8,9 @@ set(plasmaquick_LIB_SRC
private/configcategory_p.cpp private/configcategory_p.cpp
) )
add_library(PlasmaQuick SHARED ${plasmaquick_LIB_SRC}) add_library(KF5PlasmaQuick SHARED ${plasmaquick_LIB_SRC})
target_link_libraries(PlasmaQuick target_link_libraries(KF5PlasmaQuick
Qt5::Quick Qt5::Quick
Qt5::Qml Qt5::Qml
KF5::KWindowSystem KF5::KWindowSystem
@ -19,18 +19,19 @@ target_link_libraries(PlasmaQuick
KF5::KService KF5::KService
KF5::KCoreAddons KF5::KCoreAddons
KF5::XmlGui KF5::XmlGui
Plasma KF5::Plasma
KF5::KDeclarative KF5::KDeclarative
) )
set_target_properties(PlasmaQuick PROPERTIES set_target_properties(KF5PlasmaQuick PROPERTIES
VERSION 5.0.0 VERSION 5.0.0
SOVERSION 5 SOVERSION 5
EXPORT_NAME PlasmaQuick
) )
install(TARGETS PlasmaQuick EXPORT PlasmaQuickTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS KF5PlasmaQuick EXPORT KF5PlasmaQuickTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
generate_export_header(PlasmaQuick) generate_export_header(KF5PlasmaQuick BASE_NAME PlasmaQuick)
set(plasmaquick_LIB_INCLUDES set(plasmaquick_LIB_INCLUDES
${CMAKE_CURRENT_BINARY_DIR}/plasmaquick_export.h ${CMAKE_CURRENT_BINARY_DIR}/plasmaquick_export.h
@ -47,20 +48,20 @@ install(DIRECTORY
includes/PlasmaQuick includes/PlasmaQuick
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE COMPONENT Devel) DESTINATION ${INCLUDE_INSTALL_DIR}/KDE COMPONENT Devel)
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/PlasmaQuick") set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5PlasmaQuick")
configure_package_config_file( configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/PlasmaQuickConfig.cmake.in" "${CMAKE_CURRENT_SOURCE_DIR}/KF5PlasmaQuickConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/PlasmaQuickConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
PATH_VARS INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX PATH_VARS INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX
) )
install(FILES install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/PlasmaQuickConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfig.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}" COMPONENT Devel DESTINATION "${CMAKECONFIG_INSTALL_DIR}" COMPONENT Devel
) )
install(EXPORT PlasmaQuickTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE PlasmaQuickTargets.cmake NAMESPACE KF5:: ) install(EXPORT KF5PlasmaQuickTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5PlasmaQuickTargets.cmake NAMESPACE KF5:: )
add_subdirectory(autotests) add_subdirectory(autotests)

View File

@ -2,7 +2,7 @@
# 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}/PlasmaQuickTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/KF5PlasmaQuickTargets.cmake")
set(PlasmaQuick_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@") set(PlasmaQuick_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
set_and_check(PlasmaQuick_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") set_and_check(PlasmaQuick_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")

View File

@ -12,12 +12,13 @@ MACRO(PLASMA_UNIT_TESTS)
target_link_libraries(${_testname} target_link_libraries(${_testname}
Qt5::Test Qt5::Test
Qt5::Declarative Qt5::Declarative
Plasma KF5::KArchive KF5::KCoreAddons KF5::Plasma
KF5::KArchive KF5::KCoreAddons
KF5::KConfigGui KF5::KConfigGui
KF5::KI18n KF5::KI18n
KF5::KIOCore KF5::KIOCore
KF5::KService KF5::KService
PlasmaQuick KF5::PlasmaQuick
) )
if(QT_QTOPENGL_FOUND) if(QT_QTOPENGL_FOUND)
target_link_libraries(${_testname} Qt5::OpenGL) target_link_libraries(${_testname} Qt5::OpenGL)

View File

@ -27,8 +27,8 @@ target_link_libraries(plasma_appletscript_declarative
KF5::KDeclarative KF5::KDeclarative
KF5::KI18n KF5::KI18n
KF5::XmlGui # KActionCollection KF5::XmlGui # KActionCollection
Plasma KF5::Plasma
PlasmaQuick KF5::PlasmaQuick
) )

View File

@ -66,8 +66,8 @@ target_link_libraries(plasma-shell
KF5::KWindowSystem KF5::KWindowSystem
KF5::KCoreAddons KF5::KCoreAddons
KF5::KCrash KF5::KCrash
Plasma KF5::Plasma
PlasmaQuick KF5::PlasmaQuick
Qt5::Script Qt5::Script
KF5::Solid KF5::Solid
KF5::KDeclarative KF5::KDeclarative