Drop build dependency on kde4support for the build system

* Ported last qt4_wrap thingy to qt5_wrap thingy
* Include KF5Init (needed for kdeinit_executable
* Optionally include KF5DocTools and bind the docs subdirectory to it
* Include GenerateExportHeaders
This commit is contained in:
Martin Gräßlin 2014-04-03 10:15:57 +02:00
parent ceecc5be27
commit 28b4cfaa9a
2 changed files with 8 additions and 6 deletions

View file

@ -9,6 +9,7 @@ find_package(ECM 0.0.11 REQUIRED NO_MODULE)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(GenerateExportHeader)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
@ -47,6 +48,7 @@ find_package(KF5 CONFIG REQUIRED COMPONENTS
Crash
GlobalAccel
I18n
Init
Notifications
Service
Plasma
@ -64,10 +66,7 @@ find_package(KF5 CONFIG REQUIRED COMPONENTS
)
# optional frameworks
find_package(KF5 CONFIG COMPONENTS Activities)
# TODO: remove once the build system is completely cleaned
find_package(KF5KDE4Support REQUIRED NO_MODULE)
find_package(KF5 CONFIG COMPONENTS Activities DocTools)
if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")
find_package(OpenGL)
@ -515,7 +514,10 @@ ecm_install_icons( ${ICON_INSTALL_DIR} )
add_subdirectory(qml)
add_subdirectory(autotests)
add_subdirectory(tests)
add_subdirectory(doc)
if (KF5DocTools_FOUND)
add_subdirectory(doc)
endif()
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KWinDBusInterface")
ecm_configure_package_config_file(KWinDBusInterfaceConfig.cmake.in

View file

@ -2,7 +2,7 @@ add_definitions(-DKCMRULES)
########### next target ###############
set (kwinrules_MOC_HDRS yesnobox.h ../../client_machine.h ../../cursor.h)
qt4_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS})
qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS})
set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp ${kwinrules_MOC_SRCS})
qt5_wrap_ui(kwinrules_SRCS ruleslist.ui detectwidget.ui editshortcut.ui ruleswidgetbase.ui)