Use more target-centric cmake code
NO_CHANGELOG
This commit is contained in:
parent
5a5ce88faa
commit
2c23dc0123
@ -1,10 +1,10 @@
|
|||||||
set(customDataContainers_SRCS
|
add_library(plasma_dataengine_example_customDataContainers MODULE)
|
||||||
|
|
||||||
|
target_sources(plasma_dataengine_example_customDataContainers PRIVATE
|
||||||
customDataContainersEngine.cpp
|
customDataContainersEngine.cpp
|
||||||
httpContainer.cpp
|
httpContainer.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(plasma_dataengine_example_customDataContainers MODULE ${customDataContainers_SRCS})
|
|
||||||
|
|
||||||
kcoreaddons_desktop_to_json(plasma_dataengine_example_customDataContainers plasma-dataengine-example-customDataContainers.desktop)
|
kcoreaddons_desktop_to_json(plasma_dataengine_example_customDataContainers plasma-dataengine-example-customDataContainers.desktop)
|
||||||
|
|
||||||
target_link_libraries(plasma_dataengine_example_customDataContainers
|
target_link_libraries(plasma_dataengine_example_customDataContainers
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
set(simpleEngine_SRCS
|
add_library(plasma_dataengine_example_simpleEngine MODULE simpleEngine.cpp)
|
||||||
simpleEngine.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(plasma_dataengine_example_simpleEngine MODULE ${simpleEngine_SRCS})
|
|
||||||
|
|
||||||
kcoreaddons_desktop_to_json(plasma_dataengine_example_simpleEngine plasma-dataengine-example-simpleEngine.desktop)
|
kcoreaddons_desktop_to_json(plasma_dataengine_example_simpleEngine plasma-dataengine-example-simpleEngine.desktop)
|
||||||
|
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
set(sourcesOnRequest_SRCS
|
add_library(plasma_dataengine_example_sourcesOnRequest MODULE sourcesOnRequest.cpp)
|
||||||
sourcesOnRequest.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(plasma_dataengine_example_sourcesOnRequest MODULE ${sourcesOnRequest_SRCS})
|
|
||||||
|
|
||||||
kcoreaddons_desktop_to_json(plasma_dataengine_example_sourcesOnRequest plasma-dataengine-example-sourcesOnRequest.desktop)
|
kcoreaddons_desktop_to_json(plasma_dataengine_example_sourcesOnRequest plasma-dataengine-example-sourcesOnRequest.desktop)
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
set(exampleplasmashell-app_SRCS
|
add_executable(exampleplasmashell)
|
||||||
|
|
||||||
|
target_sources(exampleplasmashell PRIVATE
|
||||||
customcorona.cpp
|
customcorona.cpp
|
||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(exampleplasmashell ${exampleplasmashell-app_SRCS})
|
target_link_libraries(exampleplasmashell
|
||||||
|
|
||||||
target_link_libraries(
|
|
||||||
exampleplasmashell
|
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
Qt5::Qml
|
Qt5::Qml
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
set(test_SRCS
|
add_library(plasma_containmentactions_test MODULE test.cpp)
|
||||||
test.cpp
|
ki18n_wrap_ui(plasma_containmentactions_test config.ui)
|
||||||
)
|
|
||||||
ki18n_wrap_ui(test_SRCS config.ui)
|
|
||||||
|
|
||||||
add_library(plasma_containmentactions_test MODULE ${test_SRCS})
|
|
||||||
target_link_libraries(plasma_containmentactions_test KF5::Plasma KF5::I18n KF5::KIOWidgets KF5::XmlGui)
|
target_link_libraries(plasma_containmentactions_test KF5::Plasma KF5::I18n KF5::KIOWidgets KF5::XmlGui)
|
||||||
|
|
||||||
install(TARGETS plasma_containmentactions_test DESTINATION ${KDE_INSTALL_PLUGINDIR})
|
install(TARGETS plasma_containmentactions_test DESTINATION ${KDE_INSTALL_PLUGINDIR})
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
set(calendar_SRCS
|
add_library(calendarplugin SHARED)
|
||||||
|
|
||||||
|
target_sources(calendarplugin PRIVATE
|
||||||
calendarplugin.cpp
|
calendarplugin.cpp
|
||||||
#incidencemodifier.cpp
|
#incidencemodifier.cpp
|
||||||
calendar.cpp
|
calendar.cpp
|
||||||
@ -11,8 +13,6 @@ set(calendar_SRCS
|
|||||||
eventpluginsmanager.cpp
|
eventpluginsmanager.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(calendarplugin SHARED ${calendar_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(calendarplugin
|
target_link_libraries(calendarplugin
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
|
@ -6,7 +6,9 @@ endif()
|
|||||||
|
|
||||||
configure_file(config-x11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-x11.h)
|
configure_file(config-x11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-x11.h)
|
||||||
|
|
||||||
set(corebindings_SRCS
|
add_library(corebindingsplugin SHARED)
|
||||||
|
|
||||||
|
target_sources(corebindingsplugin PRIVATE
|
||||||
corebindingsplugin.cpp
|
corebindingsplugin.cpp
|
||||||
colorscope.cpp
|
colorscope.cpp
|
||||||
datamodel.cpp
|
datamodel.cpp
|
||||||
@ -22,11 +24,10 @@ set(corebindings_SRCS
|
|||||||
iconitem.cpp
|
iconitem.cpp
|
||||||
units.cpp
|
units.cpp
|
||||||
windowthumbnail.cpp
|
windowthumbnail.cpp
|
||||||
)
|
|
||||||
|
|
||||||
qt_add_resources(corebindings_SRCS shaders.qrc)
|
shaders.qrc
|
||||||
|
)
|
||||||
|
|
||||||
add_library(corebindingsplugin SHARED ${corebindings_SRCS})
|
|
||||||
target_link_libraries(corebindingsplugin
|
target_link_libraries(corebindingsplugin
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
Qt5::Qml
|
Qt5::Qml
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#find_package(KF5Declarative REQUIRED NO_MODULE)
|
#find_package(KF5Declarative REQUIRED NO_MODULE)
|
||||||
|
|
||||||
set(plasmacomponents_SRCS
|
add_library(plasmacomponentsplugin SHARED)
|
||||||
|
|
||||||
|
target_sources(plasmacomponentsplugin PRIVATE
|
||||||
#fullscreensheet.cpp
|
#fullscreensheet.cpp
|
||||||
#fullscreenwindow.cpp
|
#fullscreenwindow.cpp
|
||||||
plasmacomponentsplugin.cpp
|
plasmacomponentsplugin.cpp
|
||||||
@ -10,7 +12,6 @@ set(plasmacomponents_SRCS
|
|||||||
qmenuitem.cpp
|
qmenuitem.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(plasmacomponentsplugin SHARED ${plasmacomponents_SRCS})
|
|
||||||
target_link_libraries(plasmacomponentsplugin
|
target_link_libraries(plasmacomponentsplugin
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
|
@ -4,14 +4,13 @@
|
|||||||
# TYPE REQUIRED
|
# TYPE REQUIRED
|
||||||
# PURPOSE "Provides the ability to access activities from QML."
|
# PURPOSE "Provides the ability to access activities from QML."
|
||||||
# )
|
# )
|
||||||
|
add_library(plasmaextracomponentsplugin SHARED)
|
||||||
|
|
||||||
set(plasmaextracomponents_SRCS
|
target_sources(plasmaextracomponentsplugin PRIVATE
|
||||||
appbackgroundprovider.cpp
|
appbackgroundprovider.cpp
|
||||||
plasmaextracomponentsplugin.cpp
|
plasmaextracomponentsplugin.cpp
|
||||||
fallbackcomponent.cpp
|
fallbackcomponent.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(plasmaextracomponentsplugin SHARED ${plasmaextracomponents_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(plasmaextracomponentsplugin
|
target_link_libraries(plasmaextracomponentsplugin
|
||||||
Qt5::Quick
|
Qt5::Quick
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
set(platformcomponents_SRCS
|
add_library(platformcomponentsplugin SHARED)
|
||||||
|
|
||||||
|
target_sources(platformcomponentsplugin PRIVATE
|
||||||
platformextensionplugin.cpp
|
platformextensionplugin.cpp
|
||||||
application.cpp
|
application.cpp
|
||||||
icondialog.cpp
|
icondialog.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(platformcomponentsplugin SHARED ${platformcomponents_SRCS})
|
target_link_libraries(platformcomponentsplugin
|
||||||
|
|
||||||
target_link_libraries(
|
|
||||||
platformcomponentsplugin
|
|
||||||
Qt5::Core
|
Qt5::Core
|
||||||
Qt5::DBus
|
Qt5::DBus
|
||||||
Qt5::Qml
|
Qt5::Qml
|
||||||
|
@ -6,9 +6,16 @@ endif()
|
|||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-plasma.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-plasma.h)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-plasma.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-plasma.h)
|
||||||
|
|
||||||
########### next target ###############
|
add_library(KF5Plasma)
|
||||||
|
add_library(KF5::Plasma ALIAS KF5Plasma)
|
||||||
|
|
||||||
set(Plasma_LIB_SRCS
|
set_target_properties(KF5Plasma PROPERTIES
|
||||||
|
VERSION ${PLASMA_VERSION}
|
||||||
|
SOVERSION ${PLASMA_SOVERSION}
|
||||||
|
EXPORT_NAME Plasma
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(KF5Plasma PRIVATE
|
||||||
#global
|
#global
|
||||||
plasma.cpp
|
plasma.cpp
|
||||||
pluginloader.cpp
|
pluginloader.cpp
|
||||||
@ -50,17 +57,17 @@ set(Plasma_LIB_SRCS
|
|||||||
if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND
|
if(NOT EXCLUDE_DEPRECATED_BEFORE_AND_AT STREQUAL "CURRENT" AND
|
||||||
EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.83.0)
|
EXCLUDE_DEPRECATED_BEFORE_AND_AT VERSION_LESS 5.83.0)
|
||||||
#packages
|
#packages
|
||||||
set(Plasma_LIB_SRCS ${Plasma_LIB_SRCS} package.cpp packagestructure.cpp)
|
target_sources(KF5Plasma PRIVATE package.cpp packagestructure.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(HAVE_X11)
|
if(HAVE_X11)
|
||||||
set(Plasma_LIB_SRCS ${Plasma_LIB_SRCS} private/effectwatcher.cpp)
|
target_sources(KF5Plasma PRIVATE private/effectwatcher.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
kconfig_add_kcfg_files(Plasma_LIB_SRCS data/kconfigxt/libplasma-theme-global.kcfgc)
|
kconfig_add_kcfg_files(KF5Plasma data/kconfigxt/libplasma-theme-global.kcfgc)
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(Plasma_LIB_SRCS
|
ecm_qt_declare_logging_category(KF5Plasma
|
||||||
HEADER debug_p.h
|
HEADER debug_p.h
|
||||||
IDENTIFIER LOG_PLASMA
|
IDENTIFIER LOG_PLASMA
|
||||||
CATEGORY_NAME kf.plasma.core
|
CATEGORY_NAME kf.plasma.core
|
||||||
@ -69,8 +76,6 @@ ecm_qt_declare_logging_category(Plasma_LIB_SRCS
|
|||||||
EXPORT PLASMA
|
EXPORT PLASMA
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(KF5Plasma ${Plasma_LIB_SRCS})
|
|
||||||
add_library(KF5::Plasma ALIAS KF5Plasma)
|
|
||||||
ecm_generate_export_header(KF5Plasma
|
ecm_generate_export_header(KF5Plasma
|
||||||
EXPORT_FILE_NAME plasma/plasma_export.h
|
EXPORT_FILE_NAME plasma/plasma_export.h
|
||||||
BASE_NAME Plasma
|
BASE_NAME Plasma
|
||||||
@ -120,12 +125,6 @@ target_include_directories(KF5Plasma INTERFACE
|
|||||||
"$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5};${KDE_INSTALL_INCLUDEDIR_KF5}/Plasma>"
|
"$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5};${KDE_INSTALL_INCLUDEDIR_KF5}/Plasma>"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(KF5Plasma PROPERTIES
|
|
||||||
VERSION ${PLASMA_VERSION}
|
|
||||||
SOVERSION ${PLASMA_SOVERSION}
|
|
||||||
EXPORT_NAME Plasma
|
|
||||||
)
|
|
||||||
|
|
||||||
########### install files ###############
|
########### install files ###############
|
||||||
ecm_generate_headers(Plasma_CamelCase_HEADERS
|
ecm_generate_headers(Plasma_CamelCase_HEADERS
|
||||||
HEADER_NAMES
|
HEADER_NAMES
|
||||||
|
@ -4,7 +4,16 @@ else()
|
|||||||
add_definitions(-DHAVE_XCB_SHAPE=0)
|
add_definitions(-DHAVE_XCB_SHAPE=0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(plasmaquick_LIB_SRC
|
add_library(KF5PlasmaQuick SHARED)
|
||||||
|
add_library(KF5::PlasmaQuick ALIAS KF5PlasmaQuick)
|
||||||
|
|
||||||
|
set_target_properties(KF5PlasmaQuick PROPERTIES
|
||||||
|
VERSION ${PLASMA_VERSION}
|
||||||
|
SOVERSION ${PLASMA_SOVERSION}
|
||||||
|
EXPORT_NAME PlasmaQuick
|
||||||
|
)
|
||||||
|
|
||||||
|
target_sources(KF5PlasmaQuick PRIVATE
|
||||||
appletquickitem.cpp
|
appletquickitem.cpp
|
||||||
debug_p.cpp
|
debug_p.cpp
|
||||||
dialog.cpp
|
dialog.cpp
|
||||||
@ -21,10 +30,10 @@ set(plasmaquick_LIB_SRC
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(HAVE_KWAYLAND)
|
if(HAVE_KWAYLAND)
|
||||||
set(plasmaquick_LIB_SRC ${plasmaquick_LIB_SRC} waylandintegration.cpp)
|
target_sources(KF5PlasmaQuick PRIVATE waylandintegration.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(PlasmaQuick_LIB_SRCS
|
ecm_qt_declare_logging_category(KF5PlasmaQuick
|
||||||
HEADER debug_p.h
|
HEADER debug_p.h
|
||||||
IDENTIFIER LOG_PLASMAQUICK
|
IDENTIFIER LOG_PLASMAQUICK
|
||||||
CATEGORY_NAME kf.plasma.quick
|
CATEGORY_NAME kf.plasma.quick
|
||||||
@ -33,8 +42,6 @@ ecm_qt_declare_logging_category(PlasmaQuick_LIB_SRCS
|
|||||||
EXPORT PLASMA
|
EXPORT PLASMA
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(KF5PlasmaQuick SHARED ${plasmaquick_LIB_SRC})
|
|
||||||
add_library(KF5::PlasmaQuick ALIAS KF5PlasmaQuick)
|
|
||||||
target_include_directories(KF5PlasmaQuick PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_BINARY_DIR}/..>")
|
target_include_directories(KF5PlasmaQuick PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_BINARY_DIR}/..>")
|
||||||
|
|
||||||
target_link_libraries(KF5PlasmaQuick
|
target_link_libraries(KF5PlasmaQuick
|
||||||
@ -75,12 +82,6 @@ if(HAVE_X11)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_properties(KF5PlasmaQuick PROPERTIES
|
|
||||||
VERSION ${PLASMA_VERSION}
|
|
||||||
SOVERSION ${PLASMA_SOVERSION}
|
|
||||||
EXPORT_NAME PlasmaQuick
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS KF5PlasmaQuick EXPORT KF5PlasmaQuickTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS KF5PlasmaQuick EXPORT KF5PlasmaQuickTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
ecm_generate_export_header(KF5PlasmaQuick
|
ecm_generate_export_header(KF5PlasmaQuick
|
||||||
|
@ -6,15 +6,16 @@ if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
#DECLARATIVE APPLET
|
#DECLARATIVE APPLET
|
||||||
set(declarative_appletscript_SRCS
|
add_library(plasma_appletscript_declarative MODULE)
|
||||||
|
|
||||||
|
target_sources(plasma_appletscript_declarative PRIVATE
|
||||||
plasmoid/declarativeappletscript.cpp
|
plasmoid/declarativeappletscript.cpp
|
||||||
plasmoid/dropmenu.cpp
|
plasmoid/dropmenu.cpp
|
||||||
plasmoid/appletinterface.cpp
|
plasmoid/appletinterface.cpp
|
||||||
plasmoid/containmentinterface.cpp
|
plasmoid/containmentinterface.cpp
|
||||||
plasmoid/wallpaperinterface.cpp
|
plasmoid/wallpaperinterface.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(plasma_appletscript_declarative MODULE ${declarative_appletscript_SRCS} )
|
|
||||||
set_target_properties(plasma_appletscript_declarative PROPERTIES PREFIX "")
|
set_target_properties(plasma_appletscript_declarative PROPERTIES PREFIX "")
|
||||||
|
|
||||||
kcoreaddons_desktop_to_json(
|
kcoreaddons_desktop_to_json(
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
# TODO: adapt "org.kde.plasma" here & elsewhere if needed (see README)
|
# TODO: adapt "org.kde.plasma" here & elsewhere if needed (see README)
|
||||||
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.%{APPNAMELC}\")
|
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.%{APPNAMELC}\")
|
||||||
|
|
||||||
set(%{APPNAMELC}_SRCS
|
add_library(plasma_applet_%{APPNAMELC} MODULE %{APPNAMELC}.cpp)
|
||||||
%{APPNAMELC}.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(plasma_applet_%{APPNAMELC} MODULE ${%{APPNAMELC}_SRCS})
|
|
||||||
|
|
||||||
kcoreaddons_desktop_to_json(plasma_applet_%{APPNAMELC} package/metadata.desktop SERVICE_TYPES plasma-applet.desktop)
|
kcoreaddons_desktop_to_json(plasma_applet_%{APPNAMELC} package/metadata.desktop SERVICE_TYPES plasma-applet.desktop)
|
||||||
|
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_org.kde.plasma.%{APPNAMELC}\")
|
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_org.kde.plasma.%{APPNAMELC}\")
|
||||||
|
|
||||||
set(%{APPNAMELC}plugin_SRCS
|
add_library(%{APPNAMELC}plugin SHARED %{APPNAMELC}plugin.cpp)
|
||||||
%{APPNAMELC}plugin.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(%{APPNAMELC}plugin SHARED ${%{APPNAMELC}plugin_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(%{APPNAMELC}plugin
|
target_link_libraries(%{APPNAMELC}plugin
|
||||||
KF5::I18n
|
KF5::I18n
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.%{APPNAMELC}\")
|
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.%{APPNAMELC}\")
|
||||||
|
|
||||||
set(%{APPNAMELC}plugin_SRCS
|
add_library(%{APPNAMELC}plugin SHARED %{APPNAMELC}plugin.cpp)
|
||||||
%{APPNAMELC}plugin.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(%{APPNAMELC}plugin SHARED ${%{APPNAMELC}plugin_SRCS})
|
|
||||||
|
|
||||||
target_link_libraries(%{APPNAMELC}plugin
|
target_link_libraries(%{APPNAMELC}plugin
|
||||||
KF5::I18n
|
KF5::I18n
|
||||||
|
Loading…
Reference in New Issue
Block a user