plasma-framework/src/plasma/CMakeLists.txt

206 lines
5.5 KiB
CMake
Raw Normal View History

# 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_KIO TRUE)
set(PLASMA_NO_PACKAGEKIT TRUE)
set(PLASMA_NO_PACKAGE_EXTRADATA TRUE)
endif()
if(NOT HAVE_X11)
set(PLASMA_NO_PACKAGEKIT TRUE)
endif()
#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_PACKAGEKIT)
add_definitions(-DPLASMA_ENABLE_PACKAGEKIT_SUPPORT=1)
2013-10-16 00:28:02 +02:00
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} Qt5::DBus)
endif()
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_definitions(-DKDE_DEFAULT_DEBUG_AREA=1209)
########### next target ###############
set(Plasma_LIB_SRCS
2013-03-13 11:56:24 +01:00
#global
plasma.cpp
pluginloader.cpp
version.cpp
private/componentinstaller.cpp
#applets,containments,corona
applet.cpp
configloader.cpp
2013-03-13 11:56:24 +01:00
containment.cpp
containmentactions.cpp
2013-03-13 11:56:24 +01:00
corona.cpp
private/applet_p.cpp
private/associatedapplicationmanager.cpp
private/containment_p.cpp
#Dataengines, services
datacontainer.cpp
dataengine.cpp
dataengineconsumer.cpp
2013-03-13 11:56:24 +01:00
service.cpp
servicejob.cpp
private/datacontainer_p.cpp
private/dataenginemanager.cpp
2013-03-13 11:56:24 +01:00
private/storage.cpp
private/storagethread.cpp
2013-03-13 11:56:24 +01:00
#packages
package.cpp
packagestructure.cpp
private/packagejob.cpp
private/packagejobthread.cpp
2013-03-13 11:56:24 +01:00
private/packages.cpp
#graphics
framesvg.cpp
svg.cpp
theme.cpp
private/theme_p.cpp
2013-03-13 11:56:24 +01:00
#scripting
scripting/appletscript.cpp
scripting/dataenginescript.cpp
scripting/scriptengine.cpp
2011-05-31 01:05:01 +02:00
)
if(HAVE_X11)
set(Plasma_LIB_SRCS ${Plasma_LIB_SRCS} private/effectwatcher.cpp)
endif()
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(KF5Plasma ${Plasma_LIB_SRCS})
add_library(KF5::Plasma ALIAS KF5Plasma)
if(HAVE_X11)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} Qt5::X11Extras ${X11_LIBRARIES} ${XCB_XCB_LIBRARY})
endif()
if(DL_LIBRARY)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} ${DL_LIBRARY})
endif()
target_link_libraries(KF5Plasma
PUBLIC
KF5::ConfigWidgets # KConfigSkeleton
KF5::Service # For kplugininfo.h and kservice.h
PRIVATE
2013-10-16 00:28:02 +02:00
Qt5::Sql
Qt5::Quick # needed in service.cpp, remove?
Qt5::Svg
2013-10-01 14:12:14 +02:00
Qt5::DBus
2013-10-22 17:57:55 +02:00
Qt5::Xml
2013-12-11 14:01:52 +01:00
KF5::Archive
2014-02-27 13:19:00 +01:00
KF5::GuiAddons #kimagecache
2013-12-11 14:01:52 +01:00
KF5::IconThemes
KF5::I18n
KF5::KIOCore
KF5::KIOWidgets
2013-12-11 14:01:52 +01:00
KF5::WindowSystem
KF5::Declarative
2013-10-22 17:57:55 +02:00
KF5::XmlGui
2013-12-10 08:25:23 +01:00
KF5::GlobalAccel
2013-10-16 00:28:02 +02:00
${PLASMA_EXTRA_LIBS}
)
target_include_directories(KF5Plasma PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..;${CMAKE_CURRENT_BINARY_DIR}/..;${CMAKE_CURRENT_SOURCE_DIR}/includes>"
)
target_include_directories(KF5Plasma INTERFACE
"$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR};${INCLUDE_INSTALL_DIR}/KDE>"
)
set_target_properties(KF5Plasma PROPERTIES
VERSION ${PLASMA_VERSION_STRING}
SOVERSION ${PLASMA_SOVERSION}
EXPORT_NAME Plasma
)
########### install files ###############
2013-12-11 13:53:09 +01:00
generate_export_header(KF5Plasma BASE_NAME Plasma)
set(Plasma_LIB_INCLUDES
applet.h
configloader.h
containment.h
containmentactions.h
corona.h
datacontainer.h
dataengine.h
2013-08-28 03:52:14 +02:00
dataengineconsumer.h
pluginloader.h
framesvg.h
2011-05-31 01:04:33 +02:00
package.h
packagestructure.h
plasma.h
${CMAKE_CURRENT_BINARY_DIR}/plasma_export.h
service.h
servicejob.h
svg.h
theme.h
2013-01-29 19:36:46 +01:00
version.h)
install(FILES
${Plasma_LIB_INCLUDES}
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma COMPONENT Devel)
2013-02-05 17:48:34 +01:00
install(DIRECTORY
includes/Plasma
2013-10-07 12:49:28 +02:00
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/ COMPONENT Devel)
2013-02-05 17:48:34 +01:00
install(FILES
scripting/appletscript.h
scripting/dataenginescript.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-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 KF5Plasma EXPORT KF5PlasmaTargets ${INSTALL_TARGETS_DEFAULT_ARGS})