392fa639b6
There's no need to make all the framework look for the QCA includes while they're only being used by the remote part. It could possibly be made more specific, but I don't think those are yet being used anyway.
247 lines
6.5 KiB
CMake
247 lines
6.5 KiB
CMake
if(QCA2_FOUND)
|
|
include_directories(
|
|
${QCA2_INCLUDE_DIR}
|
|
)
|
|
endif()
|
|
|
|
# This option should be removed, or moved down as far as possible.
|
|
# That means porting the existing frameworks to the CMake automoc
|
|
# feature. Porting is mostly removing explicit moc includes, and
|
|
# leaving the ones which are truly needed (ie, if you remove
|
|
# them, the build fails).
|
|
set(CMAKE_AUTOMOC_RELAXED_MODE ON)
|
|
|
|
if(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
|
|
set(PLASMA_NO_KNEWSTUFF TRUE)
|
|
set(PLASMA_NO_SOLID TRUE)
|
|
set(PLASMA_NO_KIO TRUE)
|
|
set(PLASMA_NO_PACKAGEKIT TRUE)
|
|
set(PLASMA_NO_PACKAGE_EXTRADATA TRUE)
|
|
set(PLASMA_NO_KUTILS TRUE)
|
|
set(PLASMA_NO_GLOBAL_SHORTCUTS TRUE)
|
|
endif(KDE_PLATFORM_FEATURE_BINARY_COMPATIBLE_FEATURE_REDUCTION)
|
|
|
|
if(NOT X11_FOUND)
|
|
set(PLASMA_NO_PACKAGEKIT TRUE)
|
|
endif(NOT X11_FOUND)
|
|
|
|
#find_package(KdepimLibs 4.5.60)
|
|
#find_package(Gpgme)
|
|
#set_package_properties(KDEPIMLIBS PROPERTIES DESCRIPTION "KDE PIM libraries"
|
|
# URL "http://www.kde.org" TYPE OPTIONAL
|
|
# PURPOSE "Needed for building several Plasma DataEngines")
|
|
|
|
if(NOT PLASMA_NO_KIO)
|
|
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS})
|
|
endif(NOT PLASMA_NO_KIO)
|
|
|
|
if(NOT PLASMA_NO_SOLID)
|
|
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} KF5::Solid)
|
|
endif(NOT PLASMA_NO_SOLID)
|
|
|
|
if(NOT PLASMA_NO_PACKAGEKIT)
|
|
add_definitions(-DPLASMA_ENABLE_PACKAGEKIT_SUPPORT=1)
|
|
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} Qt5::DBus)
|
|
endif(NOT PLASMA_NO_PACKAGEKIT)
|
|
|
|
if (NOT PLASMA_NO_KUTILS)
|
|
#FIXME: for kcmodule classes; should not be in libplasma if possible
|
|
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} ${KCMUTILS_LIBS})
|
|
endif(NOT PLASMA_NO_KUTILS)
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-plasma.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-plasma.h)
|
|
|
|
#FIXME: gpgme++ is in kdepimlibs, must move somewhere else!
|
|
include_directories(${KDEPIMLIBS_INCLUDE_DIRS} ${GPGME_INCLUDES})
|
|
|
|
add_subdirectory(autotests)
|
|
add_subdirectory(tests)
|
|
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1209)
|
|
|
|
########### next target ###############
|
|
|
|
set(Plasma_LIB_SRCS
|
|
#global
|
|
plasma.cpp
|
|
pluginloader.cpp
|
|
version.cpp
|
|
private/componentinstaller.cpp
|
|
|
|
#runners
|
|
abstractrunner.cpp
|
|
querymatch.cpp
|
|
runnercontext.cpp
|
|
runnermanager.cpp
|
|
runnersyntax.cpp
|
|
private/runnerjobs.cpp
|
|
|
|
#applets,containments,corona
|
|
applet.cpp
|
|
configloader.cpp
|
|
containment.cpp
|
|
containmentactions.cpp
|
|
corona.cpp
|
|
private/applet_p.cpp
|
|
private/associatedapplicationmanager.cpp
|
|
private/containment_p.cpp
|
|
|
|
#Dataengines, services
|
|
datacontainer.cpp
|
|
dataengine.cpp
|
|
dataengineconsumer.cpp
|
|
service.cpp
|
|
servicejob.cpp
|
|
private/datacontainer_p.cpp
|
|
private/dataenginemanager.cpp
|
|
private/storage.cpp
|
|
private/storagethread.cpp
|
|
|
|
#packages
|
|
package.cpp
|
|
packagestructure.cpp
|
|
private/packagejob.cpp
|
|
private/packagejobthread.cpp
|
|
private/packages.cpp
|
|
|
|
#graphics
|
|
framesvg.cpp
|
|
svg.cpp
|
|
theme.cpp
|
|
private/theme_p.cpp
|
|
|
|
#scripting
|
|
scripting/appletscript.cpp
|
|
scripting/dataenginescript.cpp
|
|
scripting/runnerscript.cpp
|
|
scripting/scriptengine.cpp
|
|
)
|
|
|
|
set(Plasma_LIB_SRCS ${Plasma_LIB_SRCS} private/effectwatcher.cpp)
|
|
|
|
kconfig_add_kcfg_files(Plasma_LIB_SRCS data/kconfigxt/libplasma-theme-global.kcfgc)
|
|
|
|
#NEPOMUK_GENERATE_FROM_ONTOLOGY(
|
|
# nwc.nrl
|
|
# ${metadata_test_BINARY_DIR}
|
|
# TEST_HEADERS
|
|
# TEST_SOURCES
|
|
# TEST_INCLUDES
|
|
#)
|
|
|
|
|
|
add_library(Plasma SHARED ${Plasma_LIB_SRCS})
|
|
|
|
target_link_libraries(Plasma
|
|
Qt5::Network
|
|
Qt5::Sql
|
|
Qt5::Quick # needed in service.cpp, remove?
|
|
Qt5::Svg
|
|
Qt5::DBus
|
|
Qt5::UiTools
|
|
Qt5::Xml
|
|
KF5::KArchive
|
|
KF5::KGuiAddons
|
|
KF5::KIconThemes
|
|
KF5::KI18n
|
|
KF5::KService
|
|
KF5::KIOCore
|
|
KF5::KIOWidgets
|
|
KF5::ThreadWeaver
|
|
KF5::KWindowSystem
|
|
KF5::KAuth
|
|
KF5::KDeclarative
|
|
KF5::XmlGui
|
|
KF5::KConfigWidgets
|
|
KF5::KDE4Support
|
|
${PLASMA_EXTRA_LIBS}
|
|
)
|
|
|
|
if(X11_FOUND)
|
|
target_link_libraries(Plasma Qt5::X11Extras ${X11_LIBRARIES})
|
|
endif(X11_FOUND)
|
|
|
|
if(DL_LIBRARY)
|
|
target_link_libraries(Plasma ${DL_LIBRARY})
|
|
endif(DL_LIBRARY)
|
|
|
|
target_link_libraries(Plasma LINK_INTERFACE_LIBRARIES Qt5::Widgets KF5::KConfigWidgets)
|
|
target_include_directories(Plasma PUBLIC
|
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..;${CMAKE_CURRENT_BINARY_DIR}/..;${CMAKE_CURRENT_SOURCE_DIR}/includes>"
|
|
)
|
|
target_include_directories(Plasma INTERFACE
|
|
"$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR};${INCLUDE_INSTALL_DIR}/KDE>"
|
|
)
|
|
|
|
#do NOT use GENERIC versioning -- the Plasma team will take care of versioning
|
|
set_target_properties(Plasma PROPERTIES
|
|
VERSION 5.0.0
|
|
SOVERSION 5
|
|
)
|
|
|
|
########### install files ###############
|
|
generate_export_header(Plasma)
|
|
|
|
set(Plasma_LIB_INCLUDES
|
|
abstractrunner.h
|
|
applet.h
|
|
configloader.h
|
|
containment.h
|
|
containmentactions.h
|
|
corona.h
|
|
datacontainer.h
|
|
dataengine.h
|
|
dataengineconsumer.h
|
|
pluginloader.h
|
|
framesvg.h
|
|
package.h
|
|
packagestructure.h
|
|
plasma.h
|
|
${CMAKE_CURRENT_BINARY_DIR}/plasma_export.h
|
|
querymatch.h
|
|
runnercontext.h
|
|
runnermanager.h
|
|
runnersyntax.h
|
|
service.h
|
|
servicejob.h
|
|
svg.h
|
|
theme.h
|
|
version.h)
|
|
|
|
|
|
install(FILES
|
|
${Plasma_LIB_INCLUDES}
|
|
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma COMPONENT Devel)
|
|
|
|
install(DIRECTORY
|
|
includes/Plasma
|
|
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/ COMPONENT Devel)
|
|
|
|
|
|
install(FILES
|
|
scripting/appletscript.h
|
|
scripting/dataenginescript.h
|
|
#scripting/runnerscript.h
|
|
scripting/scriptengine.h
|
|
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/scripting COMPONENT Devel)
|
|
|
|
install(FILES
|
|
data/servicetypes/plasma-applet.desktop
|
|
data/servicetypes/plasma-containment.desktop
|
|
data/servicetypes/plasma-containmentactions.desktop
|
|
data/servicetypes/plasma-dataengine.desktop
|
|
data/servicetypes/plasma-generic.desktop
|
|
data/servicetypes/plasma-packagestructure.desktop
|
|
data/servicetypes/plasma-runner.desktop
|
|
data/servicetypes/plasma-scriptengine.desktop
|
|
data/servicetypes/plasma-service.desktop
|
|
data/servicetypes/plasma-shell.desktop
|
|
data/servicetypes/plasma-lookandfeel.desktop
|
|
DESTINATION ${SERVICETYPES_INSTALL_DIR})
|
|
|
|
install(FILES data/operations/dataengineservice.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(TARGETS Plasma EXPORT PlasmaTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
|