plasma-framework/CMakeLists.txt

458 lines
14 KiB
CMake

# 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_KDEWEBKIT TRUE)
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)
#macro_log_feature(KDEPIMLIBS_FOUND "kdepimlibs" "KDE PIM libraries" "http://www.kde.org" FALSE "" "Needed for building several Plasma DataEngines")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${KDE4_KDECORE_INCLUDES}
${KDE4_KDEUI_INCLUDES}
${CMAKE_SOURCE_DIR}/experimental/libkdeclarative
${CMAKE_BINARY_DIR}/experimental/libkdeclarative
${karchive_SOURCE_DIR}/src
${karchive_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/tier2/kauth/src/
${CMAKE_BINARY_DIR}/tier2/kauth/src/
${CMAKE_SOURCE_DIR}/tier1/threadweaver/src
${CMAKE_BINARY_DIR}/tier1/threadweaver/src
${CMAKE_BINARY_DIR}/tier1/threadweaver/src/Weaver
${CMAKE_SOURCE_DIR}/tier1/kwindowsystem/
${CMAKE_BINARY_DIR}/tier1/kwindowsystem/
${CMAKE_SOURCE_DIR}/tier1/solid/src
${CMAKE_BINARY_DIR}/tier1/solid/src
${CMAKE_SOURCE_DIR}/plasma/remote
${CMAKE_SOURCE_DIR}/plasma/private/qtjolie-branch/qtjolie
${CMAKE_SOURCE_DIR}/plasma/private/qtjolie-branch
${CMAKE_SOURCE_DIR}/plasma/private/qtjolie-branch/includes
${CMAKE_SOURCE_DIR}/tier1/kcoreaddons/src/caching
)
if(NOT PLASMA_NO_KIO)
include_directories(${KDE4_KIO_INCLUDES})
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} ${KDE4_KIO_LIBS})
endif(NOT PLASMA_NO_KIO)
if(NOT PLASMA_NO_KDEWEBKIT)
include_directories(${CMAKE_SOURCE_DIR}/kdewebkit/)
include_directories(${CMAKE_BINARY_DIR}/kdewebkit/)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} kdewebkit)
endif(NOT PLASMA_NO_KDEWEBKIT)
if(NOT PLASMA_NO_KNEWSTUFF)
include_directories(${CMAKE_SOURCE_DIR}/knewstuff/)
include_directories(${CMAKE_BINARY_DIR}/knewstuff/)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} knewstuff3)
endif(NOT PLASMA_NO_KNEWSTUFF)
if(NOT PLASMA_NO_SOLID)
include_directories(${CMAKE_BINARY_DIR}/tier1/solid/)
include_directories(${CMAKE_SOURCE_DIR}/tier1/solid/)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} ${KDE4_SOLID_LIBS})
endif(NOT PLASMA_NO_SOLID)
if(NOT PLASMA_NO_PACKAGEKIT)
add_definitions(-DPLASMA_ENABLE_PACKAGEKIT_SUPPORT=1)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} ${QT_QTDBUS_LIBRARY})
endif(NOT PLASMA_NO_PACKAGEKIT)
if (NOT PLASMA_NO_KUTILS)
include_directories(${CMAKE_SOURCE_DIR}/kutils)
include_directories(${CMAKE_BINARY_DIR}/kutils)
set(PLASMA_EXTRA_LIBS ${PLASMA_EXTRA_LIBS} ${KDE4_KUTILS_LIBS})
endif(NOT PLASMA_NO_KUTILS)
if(QCA2_FOUND)
include_directories(${QCA2_INCLUDE_DIR})
set(ENABLE_REMOTE_WIDGETS TRUE)
endif(QCA2_FOUND)
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(tests)
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1209)
########### next target ###############
set(plasma_LIB_SRCS
abstractrunner.cpp
${plasmagik_SRCS}
abstractdialogmanager.cpp
configloader.cpp
containmentactions.cpp
containmentactionspluginsconfig.cpp
coronabase.cpp
datacontainer.cpp
dataengine.cpp
dataenginemanager.cpp
package.cpp
packagestructure.cpp
paintutils.cpp
pluginloader.cpp
framesvg.cpp
plasma.cpp
pluginloader.cpp
private/associatedapplicationmanager.cpp
private/componentinstaller.cpp
private/datacontainer_p.cpp
private/dataengineconsumer.cpp
private/dataengineservice.cpp
private/effects/halopainter.cpp
private/effectwatcher.cpp
private/getsource.cpp
private/packages.cpp
private/plasmoidservice.cpp
private/remotedataengine.cpp
private/remoteservice.cpp
private/remoteservicejob.cpp
private/runnerjobs.cpp
private/serviceprovider.cpp
private/storage.cpp
private/storagethread.cpp
private/tooltip.cpp
private/wallpaperrenderthread.cpp
private/windowpreview.cpp
private/windowshadows.cpp
private/applet_p.cpp
private/containment_p.cpp
querymatch.cpp
remote/accessmanager.cpp
remote/accessappletjob.cpp
remote/authorizationinterface.cpp
remote/authorizationmanager.cpp
remote/authorizationrule.cpp
remote/clientpinrequest.cpp
remote/credentials.cpp
remote/denyallauthorization.cpp
remote/pinpairingauthorization.cpp
remote/pinpairingdialog.cpp
remote/serviceaccessjob.cpp
#remote/signing.cpp TODO: re-enable, needs gpgmepp though
remote/trustedonlyauthorization.cpp
runnercontext.cpp
runnermanager.cpp
runnersyntax.cpp
scripting/appletscript.cpp
scripting/dataenginescript.cpp
scripting/runnerscript.cpp
scripting/wallpaperscript.cpp
scripting/scriptengine.cpp
service.cpp
servicejob.cpp
svg.cpp
theme.cpp
tooltipcontent.cpp
tooltipmanager.cpp
version.cpp
wallpaper.cpp
#Temporary QtJolie branch
private/qtjolie-branch/qtjolie/abstractadaptor.cpp
private/qtjolie-branch/qtjolie/client.cpp
private/qtjolie-branch/qtjolie/clientthread.cpp
private/qtjolie-branch/qtjolie/value.cpp
private/qtjolie-branch/qtjolie/fault.cpp
private/qtjolie-branch/qtjolie/message.cpp
private/qtjolie-branch/qtjolie/metaservice.cpp
private/qtjolie-branch/qtjolie/pendingcall.cpp
private/qtjolie-branch/qtjolie/pendingcallwatcher.cpp
private/qtjolie-branch/qtjolie/pendingreply.cpp
private/qtjolie-branch/qtjolie/server.cpp
private/qtjolie-branch/qtjolie/serverthread.cpp
#FIXME: all these must move into the qgv library
private/themedwidgetinterface.cpp
widgets/iconwidget.cpp
abstracttoolbox.cpp
view.cpp
applet.cpp
containment.cpp
corona.cpp
dialog.cpp
popupapplet.cpp
private/applethandle.cpp
)
set (plasmaqgv_LIB_SRCS
delegate.cpp
#FIXME: this is duplicated with libplasma because iconwidget requires it!
private/themedwidgetinterface.cpp
graphicsview/private/graphicsviewappletprivate.cpp
animator.cpp
animations/animation.cpp
animations/easinganimation.cpp
animations/fade.cpp
animations/grow.cpp
animations/pendulumcurve.cpp
animations/pixmaptransition.cpp
animations/pulser.cpp
animations/rotation.cpp
animations/rotationstacked.cpp
animations/slide.cpp
animations/stackedlayout.cpp
animations/geometry.cpp
animations/widgetsnapshot.cpp
animations/zoom.cpp
private/declarative/declarativenetworkaccessmanagerfactory.cpp
private/declarative/dataenginebindings.cpp
graphicsview/private/animablegraphicswebview.cpp
graphicsview/private/focusindicator.cpp
graphicsview/private/nativetabbar.cpp
graphicsview/private/style.cpp
graphicsview/private/kineticscroll.cpp
widgets/label.cpp
widgets/scrollbar.cpp
widgets/svgwidget.cpp
widgets/scrollwidget.cpp
widgets/textedit.cpp
widgets/textbrowser.cpp
widgets/busywidget.cpp
widgets/checkbox.cpp
widgets/combobox.cpp
widgets/declarativewidget.cpp
widgets/flashinglabel.cpp
widgets/frame.cpp
widgets/groupbox.cpp
widgets/itembackground.cpp
widgets/lineedit.cpp
widgets/meter.cpp
widgets/pushbutton.cpp
widgets/radiobutton.cpp
widgets/signalplotter.cpp
widgets/slider.cpp
widgets/spinbox.cpp
widgets/toolbutton.cpp
widgets/separator.cpp
widgets/tabbar.cpp
widgets/treeview.cpp
widgets/webview.cpp
)
kconfig_add_kcfg_files(plasma_LIB_SRCS data/kconfigxt/libplasma-theme-global.kcfgc)
kde4_add_ui_files(plasma_LIB_SRCS
remote/pinpairing.ui
private/publish.ui)
#NEPOMUK_GENERATE_FROM_ONTOLOGY(
# nwc.nrl
# ${metadata_test_BINARY_DIR}
# TEST_HEADERS
# TEST_SOURCES
# TEST_INCLUDES
#)
if (PHONON_FOUND)
message(STATUS "Adding support for Phonon to libplasma")
include_directories(${KDE4_PHONON_INCLUDES})
set(plasmaqgv_LIB_SRCS
${plasmaqgv_LIB_SRCS}
widgets/videowidget.cpp)
endif(PHONON_FOUND)
kde4_add_library(plasma ${LIBRARY_TYPE} ${plasma_LIB_SRCS})
kde4_add_library(plasmaqgv ${LIBRARY_TYPE} ${plasmaqgv_LIB_SRCS})
target_link_libraries(plasma ${QT_QTUITOOLS_LIBRARY} ${QT_QTWEBKIT_LIBRARY}
${QT_QTSCRIPT_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTSQL_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY}
${KDE4_KDEUI_LIBS} kdnssd threadweaver kauth kwindowsystem ${PLASMA_EXTRA_LIBS} kcoreaddons ${QtMimeTypes_LIBRARY})
#FIXME gpgme++ is in kdepimlibs, neeeds to be elsewhere
target_link_libraries(plasma ${KDEPIMLIBS_GPGMEPP_LIBS} karchive)
target_link_libraries(plasmaqgv plasma ${QT_QTUITOOLS_LIBRARY} ${QT_QTWEBKIT_LIBRARY}
${QT_QTSCRIPT_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY}
${KDE4_KDEUI_LIBS} kdeclarative ${PLASMA_EXTRA_LIBS} kcoreaddons ${QtMimeTypes_LIBRARY})
if(QCA2_FOUND)
target_link_libraries(plasma ${QCA2_LIBRARIES})
endif(QCA2_FOUND)
if(X11_FOUND)
target_link_libraries(plasma ${X11_LIBRARIES})
endif(X11_FOUND)
if(PHONON_FOUND)
target_link_libraries(plasmaqgv ${KDE4_PHONON_LIBS})
endif(PHONON_FOUND)
if(DL_LIBRARY)
target_link_libraries(plasma ${DL_LIBRARY})
endif(DL_LIBRARY)
target_link_libraries(plasma LINK_INTERFACE_LIBRARIES kdeui kdecore kwindowsystem ${QT_QTGUI_LIBRARY})
#do NOT use GENERIC versioning -- the plasma team will take care of versioning
set_target_properties(plasma PROPERTIES
VERSION 4.0.0
SOVERSION 4
)
set_target_properties(plasmaqgv PROPERTIES
VERSION 1.0.0
SOVERSION 1
)
install(TARGETS plasma EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS plasmaqgv EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
generate_export_header(plasma)
set(plasma_LIB_INCLUDES
abstractdialogmanager.h
abstractrunner.h
abstracttoolbox.h
animations/animation.h
animator.h
applet.h
configloader.h
containment.h
containmentactions.h
containmentactionspluginsconfig.h
corona.h
datacontainer.h
dataengine.h
dataenginemanager.h
delegate.h
dialog.h
pluginloader.h
paintutils.h
framesvg.h
package.h
packagestructure.h
plasma.h
${CMAKE_CURRENT_BINARY_DIR}/plasma_export.h
popupapplet.h
querymatch.h
remote/accessappletjob.h
remote/accessmanager.h
remote/authorizationmanager.h
remote/authorizationrule.h
remote/authorizationinterface.h
remote/clientpinrequest.h
remote/credentials.h
remote/serviceaccessjob.h
runnercontext.h
runnermanager.h
runnersyntax.h
service.h
servicejob.h
svg.h
theme.h
tooltipcontent.h
tooltipmanager.h
version.h
view.h
wallpaper.h)
install(FILES
${plasma_LIB_INCLUDES}
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma COMPONENT Devel)
install(FILES
widgets/checkbox.h
widgets/combobox.h
widgets/declarativewidget.h
widgets/flashinglabel.h
widgets/frame.h
widgets/groupbox.h
widgets/iconwidget.h
widgets/itembackground.h
widgets/label.h
widgets/lineedit.h
widgets/meter.h
widgets/pushbutton.h
widgets/toolbutton.h
widgets/radiobutton.h
widgets/scrollbar.h
widgets/signalplotter.h
widgets/slider.h
widgets/spinbox.h
widgets/busywidget.h
widgets/separator.h
widgets/svgwidget.h
widgets/scrollwidget.h
widgets/tabbar.h
widgets/textbrowser.h
widgets/treeview.h
widgets/textedit.h
widgets/webview.h
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/widgets COMPONENT Devel)
install(FILES
scripting/appletscript.h
scripting/dataenginescript.h
scripting/runnerscript.h
scripting/wallpaperscript.h
scripting/scriptengine.h
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/scripting COMPONENT Devel)
if(PHONON_FOUND)
install (FILES
widgets/videowidget.h
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/widgets COMPONENT Devel)
endif(PHONON_FOUND)
install(FILES
animations/animation.h
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma/animations COMPONENT Devel)
install(FILES
data/servicetypes/plasma-animator.desktop
data/servicetypes/plasma-applet.desktop
data/servicetypes/plasma-applet-popupapplet.desktop
data/servicetypes/plasma-containment.desktop
data/servicetypes/plasma-containmentactions.desktop
data/servicetypes/plasma-dataengine.desktop
data/servicetypes/plasma-packagestructure.desktop
data/servicetypes/plasma-runner.desktop
data/servicetypes/plasma-scriptengine.desktop
data/servicetypes/plasma-service.desktop
data/servicetypes/plasma-toolbox.desktop
data/servicetypes/plasma-wallpaper.desktop
DESTINATION ${SERVICETYPES_INSTALL_DIR})
install(FILES
data/services/plasma.protocol
DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES data/knewstuff/plasmoids.knsrc DESTINATION ${CONFIG_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)