From 3214bd8132afdf263197d4de6903912f5e536cfd Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Wed, 11 Dec 2013 12:39:48 +0100 Subject: [PATCH] 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 --- ...onfig.cmake.in => KF5PlasmaConfig.cmake.in | 4 +-- PlasmaMacros.cmake => KF5PlasmaMacros.cmake | 0 .../customDataContainers/CMakeLists.txt | 2 +- .../dataengines/simpleEngine/CMakeLists.txt | 2 +- .../sourcesOnRequest/CMakeLists.txt | 2 +- src/declarativeimports/core/CMakeLists.txt | 2 +- .../core/tests/CMakeLists.txt | 2 +- .../krunnermodel/CMakeLists.txt | 7 +++-- .../plasmacomponents/CMakeLists.txt | 2 +- .../plasmaextracomponents/CMakeLists.txt | 2 +- .../qtextracomponents/CMakeLists.txt | 2 +- src/plasma/CMakeLists.txt | 25 ++++++++--------- src/plasma/autotests/CMakeLists.txt | 4 +-- src/plasma/tests/kplugins/CMakeLists.txt | 2 +- src/plasmapkg/CMakeLists.txt | 2 +- src/plasmaquick/CMakeLists.txt | 27 ++++++++++--------- ...cmake.in => KF5PlasmaQuickConfig.cmake.in} | 2 +- src/plasmaquick/autotests/CMakeLists.txt | 5 ++-- src/scriptengines/qml/CMakeLists.txt | 4 +-- src/shell/CMakeLists.txt | 4 +-- 20 files changed, 52 insertions(+), 50 deletions(-) rename PlasmaConfig.cmake.in => KF5PlasmaConfig.cmake.in (70%) rename PlasmaMacros.cmake => KF5PlasmaMacros.cmake (100%) rename src/plasmaquick/{PlasmaQuickConfig.cmake.in => KF5PlasmaQuickConfig.cmake.in} (82%) diff --git a/PlasmaConfig.cmake.in b/KF5PlasmaConfig.cmake.in similarity index 70% rename from PlasmaConfig.cmake.in rename to KF5PlasmaConfig.cmake.in index 63318823c..13c37e767 100644 --- a/PlasmaConfig.cmake.in +++ b/KF5PlasmaConfig.cmake.in @@ -2,11 +2,11 @@ # 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_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}/KF5PlasmaMacros.cmake") diff --git a/PlasmaMacros.cmake b/KF5PlasmaMacros.cmake similarity index 100% rename from PlasmaMacros.cmake rename to KF5PlasmaMacros.cmake diff --git a/examples/dataengines/customDataContainers/CMakeLists.txt b/examples/dataengines/customDataContainers/CMakeLists.txt index 7029f936f..a6cb6abd7 100644 --- a/examples/dataengines/customDataContainers/CMakeLists.txt +++ b/examples/dataengines/customDataContainers/CMakeLists.txt @@ -7,7 +7,7 @@ kservice_desktop_to_json(plasma-dataengine-example-customDataContainers.desktop) add_library(plasma_dataengine_example_customDataContainers MODULE ${customDataContainers_SRCS}) target_link_libraries(plasma_dataengine_example_customDataContainers - Plasma + KF5::Plasma KF5::KIOCore KF5::KService ) diff --git a/examples/dataengines/simpleEngine/CMakeLists.txt b/examples/dataengines/simpleEngine/CMakeLists.txt index ee6edd4e8..bba4f9815 100644 --- a/examples/dataengines/simpleEngine/CMakeLists.txt +++ b/examples/dataengines/simpleEngine/CMakeLists.txt @@ -7,7 +7,7 @@ kservice_desktop_to_json(plasma-dataengine-example-simpleEngine.desktop) add_library(plasma_dataengine_example_simpleEngine MODULE ${simpleEngine_SRCS}) target_link_libraries(plasma_dataengine_example_simpleEngine - Plasma + KF5::Plasma KF5::KService KF5::KI18n ) diff --git a/examples/dataengines/sourcesOnRequest/CMakeLists.txt b/examples/dataengines/sourcesOnRequest/CMakeLists.txt index d4557f5c8..22787702e 100644 --- a/examples/dataengines/sourcesOnRequest/CMakeLists.txt +++ b/examples/dataengines/sourcesOnRequest/CMakeLists.txt @@ -7,7 +7,7 @@ kservice_desktop_to_json(plasma-dataengine-example-sourcesOnRequest.desktop) add_library(plasma_dataengine_example_sourcesOnRequest MODULE ${sourcesOnRequest_SRCS}) target_link_libraries(plasma_dataengine_example_sourcesOnRequest - Plasma + KF5::Plasma KF5::KService ) diff --git a/src/declarativeimports/core/CMakeLists.txt b/src/declarativeimports/core/CMakeLists.txt index 89fa12267..eda9950ea 100644 --- a/src/declarativeimports/core/CMakeLists.txt +++ b/src/declarativeimports/core/CMakeLists.txt @@ -37,7 +37,7 @@ target_link_libraries(corebindingsplugin KF5::KCoreAddons KF5::KIconThemes KF5::KWindowSystem - Plasma) + KF5::Plasma) if(X11_FOUND) target_link_libraries(corebindingsplugin ${X11_LIBRARIES} ${XCB_XCB_LIBRARY} ) diff --git a/src/declarativeimports/core/tests/CMakeLists.txt b/src/declarativeimports/core/tests/CMakeLists.txt index 0a90003eb..cb63def4a 100644 --- a/src/declarativeimports/core/tests/CMakeLists.txt +++ b/src/declarativeimports/core/tests/CMakeLists.txt @@ -12,7 +12,7 @@ add_executable(sortfiltermodeltest ) target_link_libraries(sortfiltermodeltest - Plasma + KF5::Plasma Qt5::Gui Qt5::Test KF5::KI18n diff --git a/src/declarativeimports/krunnermodel/CMakeLists.txt b/src/declarativeimports/krunnermodel/CMakeLists.txt index 517b833ee..ad550d7ab 100644 --- a/src/declarativeimports/krunnermodel/CMakeLists.txt +++ b/src/declarativeimports/krunnermodel/CMakeLists.txt @@ -9,10 +9,9 @@ add_library(runnermodelplugin SHARED ${runnermodel_SRCS}) target_link_libraries(runnermodelplugin Qt5::Quick Qt5::Qml - KF5::KI18n - Plasma - ) - + KF5::KI18n + KF5::Plasma + ) install(TARGETS runnermodelplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/runnermodel) install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/runnermodel) diff --git a/src/declarativeimports/plasmacomponents/CMakeLists.txt b/src/declarativeimports/plasmacomponents/CMakeLists.txt index 012f65260..7347eeb4c 100644 --- a/src/declarativeimports/plasmacomponents/CMakeLists.txt +++ b/src/declarativeimports/plasmacomponents/CMakeLists.txt @@ -21,7 +21,7 @@ target_link_libraries(plasmacomponentsplugin Qt5::Qml Qt5::Gui KF5::KDeclarative - Plasma) + KF5::Plasma) install(TARGETS plasmacomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/components) diff --git a/src/declarativeimports/plasmaextracomponents/CMakeLists.txt b/src/declarativeimports/plasmaextracomponents/CMakeLists.txt index c06d81e39..c91eefc76 100644 --- a/src/declarativeimports/plasmaextracomponents/CMakeLists.txt +++ b/src/declarativeimports/plasmaextracomponents/CMakeLists.txt @@ -20,7 +20,7 @@ target_link_libraries(plasmaextracomponentsplugin Qt5::Quick Qt5::Qml ${KACTIVITIES_LIBRARY} - Plasma) + KF5::Plasma) install(TARGETS plasmaextracomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/extras) diff --git a/src/declarativeimports/qtextracomponents/CMakeLists.txt b/src/declarativeimports/qtextracomponents/CMakeLists.txt index aa44ae977..6520ac04d 100644 --- a/src/declarativeimports/qtextracomponents/CMakeLists.txt +++ b/src/declarativeimports/qtextracomponents/CMakeLists.txt @@ -20,7 +20,7 @@ target_link_libraries(qtextracomponentsplugin Qt5::Gui KF5::KDeclarative KF5::KIconThemes - Plasma) + KF5::Plasma) install(TARGETS qtextracomponentsplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/qtextracomponents) diff --git a/src/plasma/CMakeLists.txt b/src/plasma/CMakeLists.txt index 3ab059615..0f2c7c327 100644 --- a/src/plasma/CMakeLists.txt +++ b/src/plasma/CMakeLists.txt @@ -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(KF5::Plasma ALIAS Plasma) +add_library(KF5Plasma ${Plasma_LIB_SRCS}) +add_library(KF5::Plasma ALIAS KF5Plasma) -target_link_libraries(Plasma +target_link_libraries(KF5Plasma Qt5::Network Qt5::Sql Qt5::Quick # needed in service.cpp, remove? @@ -140,25 +140,26 @@ target_link_libraries(Plasma ) if(X11_FOUND) - target_link_libraries(Plasma Qt5::X11Extras ${X11_LIBRARIES}) + target_link_libraries(KF5Plasma Qt5::X11Extras ${X11_LIBRARIES}) endif() if(DL_LIBRARY) - target_link_libraries(Plasma ${DL_LIBRARY}) + target_link_libraries(KF5Plasma ${DL_LIBRARY}) endif() -target_link_libraries(Plasma LINK_INTERFACE_LIBRARIES Qt5::Widgets KF5::KConfigWidgets) -target_include_directories(Plasma PUBLIC +target_link_libraries(KF5Plasma LINK_INTERFACE_LIBRARIES Qt5::Widgets KF5::KConfigWidgets) +target_include_directories(KF5Plasma PUBLIC "$" ) -target_include_directories(Plasma INTERFACE +target_include_directories(KF5Plasma INTERFACE "$" ) #do NOT use GENERIC versioning -- the Plasma team will take care of versioning -set_target_properties(Plasma PROPERTIES - VERSION 5.0.0 - SOVERSION 5 +set_target_properties(KF5Plasma PROPERTIES + VERSION 5.0.0 + SOVERSION 5 + EXPORT_NAME Plasma ) ########### 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/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}) diff --git a/src/plasma/autotests/CMakeLists.txt b/src/plasma/autotests/CMakeLists.txt index 77c9f6c48..7e39fc62b 100644 --- a/src/plasma/autotests/CMakeLists.txt +++ b/src/plasma/autotests/CMakeLists.txt @@ -10,7 +10,7 @@ MACRO(PLASMA_UNIT_TESTS) FOREACH(_testname ${ARGN}) add_executable(${_testname} ${_testname}.cpp) target_link_libraries(${_testname} Qt5::Test Qt5::Declarative - Plasma KF5::KArchive KF5::KCoreAddons + KF5::Plasma KF5::KArchive KF5::KCoreAddons KF5::KConfigGui KF5::KI18n KF5::KIOCore @@ -32,7 +32,7 @@ PLASMA_UNIT_TESTS( ) 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) ecm_mark_as_test(storagetest) diff --git a/src/plasma/tests/kplugins/CMakeLists.txt b/src/plasma/tests/kplugins/CMakeLists.txt index ebdba6679..a38ae34c7 100644 --- a/src/plasma/tests/kplugins/CMakeLists.txt +++ b/src/plasma/tests/kplugins/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(plugintest 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}") diff --git a/src/plasmapkg/CMakeLists.txt b/src/plasmapkg/CMakeLists.txt index 7eb41d881..12ebaeec8 100644 --- a/src/plasmapkg/CMakeLists.txt +++ b/src/plasmapkg/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(plasmapkg 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}") diff --git a/src/plasmaquick/CMakeLists.txt b/src/plasmaquick/CMakeLists.txt index c361df2d9..2ffbc2a56 100644 --- a/src/plasmaquick/CMakeLists.txt +++ b/src/plasmaquick/CMakeLists.txt @@ -8,9 +8,9 @@ set(plasmaquick_LIB_SRC 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::Qml KF5::KWindowSystem @@ -19,18 +19,19 @@ target_link_libraries(PlasmaQuick KF5::KService KF5::KCoreAddons KF5::XmlGui - Plasma + KF5::Plasma KF5::KDeclarative ) -set_target_properties(PlasmaQuick PROPERTIES - VERSION 5.0.0 - SOVERSION 5 +set_target_properties(KF5PlasmaQuick PROPERTIES + VERSION 5.0.0 + 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 ${CMAKE_CURRENT_BINARY_DIR}/plasmaquick_export.h @@ -47,20 +48,20 @@ install(DIRECTORY includes/PlasmaQuick 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( - "${CMAKE_CURRENT_SOURCE_DIR}/PlasmaQuickConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/PlasmaQuickConfig.cmake" + "${CMAKE_CURRENT_SOURCE_DIR}/KF5PlasmaQuickConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfig.cmake" INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} PATH_VARS INCLUDE_INSTALL_DIR CMAKE_INSTALL_PREFIX ) install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/PlasmaQuickConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/KF5PlasmaQuickConfig.cmake" 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) diff --git a/src/plasmaquick/PlasmaQuickConfig.cmake.in b/src/plasmaquick/KF5PlasmaQuickConfig.cmake.in similarity index 82% rename from src/plasmaquick/PlasmaQuickConfig.cmake.in rename to src/plasmaquick/KF5PlasmaQuickConfig.cmake.in index 5b258a22f..4d0b380d1 100644 --- a/src/plasmaquick/PlasmaQuickConfig.cmake.in +++ b/src/plasmaquick/KF5PlasmaQuickConfig.cmake.in @@ -2,7 +2,7 @@ # 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_and_check(PlasmaQuick_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") diff --git a/src/plasmaquick/autotests/CMakeLists.txt b/src/plasmaquick/autotests/CMakeLists.txt index 1fc3adf1e..8ebb428fe 100644 --- a/src/plasmaquick/autotests/CMakeLists.txt +++ b/src/plasmaquick/autotests/CMakeLists.txt @@ -12,12 +12,13 @@ MACRO(PLASMA_UNIT_TESTS) target_link_libraries(${_testname} Qt5::Test Qt5::Declarative - Plasma KF5::KArchive KF5::KCoreAddons + KF5::Plasma + KF5::KArchive KF5::KCoreAddons KF5::KConfigGui KF5::KI18n KF5::KIOCore KF5::KService - PlasmaQuick + KF5::PlasmaQuick ) if(QT_QTOPENGL_FOUND) target_link_libraries(${_testname} Qt5::OpenGL) diff --git a/src/scriptengines/qml/CMakeLists.txt b/src/scriptengines/qml/CMakeLists.txt index 3d7bd4136..b3f520438 100644 --- a/src/scriptengines/qml/CMakeLists.txt +++ b/src/scriptengines/qml/CMakeLists.txt @@ -27,8 +27,8 @@ target_link_libraries(plasma_appletscript_declarative KF5::KDeclarative KF5::KI18n KF5::XmlGui # KActionCollection - Plasma - PlasmaQuick + KF5::Plasma + KF5::PlasmaQuick ) diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt index faa51e291..598c519b0 100644 --- a/src/shell/CMakeLists.txt +++ b/src/shell/CMakeLists.txt @@ -66,8 +66,8 @@ target_link_libraries(plasma-shell KF5::KWindowSystem KF5::KCoreAddons KF5::KCrash - Plasma - PlasmaQuick + KF5::Plasma + KF5::PlasmaQuick Qt5::Script KF5::Solid KF5::KDeclarative