Commit db3a865c authored by David Faure's avatar David Faure
Browse files

Simplify cmake code: link to Qt5::GuiPrivate.

Summary:
This target was added in Qt 5.9, which we can now rely upon.
Also use target_include_directories rather than the big
include_directories hammer.

Test Plan: Compiles

Reviewers: kfunk, kossebau, broulik

Reviewed By: kfunk, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D15429
parent bd52678a
......@@ -17,6 +17,7 @@ include(FeatureSummary)
include(GenerateExportHeader)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Widgets DBus X11Extras QuickControls2)
find_package(Qt5Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Config ConfigWidgets I18n IconThemes KIO Notifications Wayland
......
......@@ -13,8 +13,6 @@ if(NOT Qt5Qml_FOUND)
message(STATUS "Qt5Qml not found, QML autotests will not be built.")
endif()
include_directories( ${Qt5Gui_PRIVATE_INCLUDE_DIRS} ${Qt5PlatformSupport_PRIVATE_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/src/platformtheme )
set(CONFIGFILE "${CMAKE_CURRENT_SOURCE_DIR}/kdeplatformtheme_kdeglobals")
set(CHANGED_CONFIGFILE "${CMAKE_CURRENT_SOURCE_DIR}/kdeplatformtheme_changed_kdeglobals")
configure_file(kdeplatformtheme_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeplatformtheme_config.h)
......@@ -29,7 +27,8 @@ macro(FRAMEWORKINTEGRATION_TESTS _testname)
add_test(NAME frameworkintegration-${_testname} COMMAND ${_testname})
ecm_mark_as_test(${_testname})
ecm_mark_nongui_executable(${_testname})
target_link_libraries(${_testname} Qt5::Test Qt5::DBus Qt5::X11Extras Qt5::QuickControls2 ${QT5PLATFORMSUPPORT_LIBS} KF5::ConfigWidgets KF5::ConfigCore KF5::IconThemes KF5::KIOFileWidgets KF5::I18n KF5::Notifications KF5::WindowSystem KF5::WaylandClient XCB::XCB)
target_include_directories(${_testname} PRIVATE ${CMAKE_BINARY_DIR}/src/platformtheme)
target_link_libraries(${_testname} Qt5::GuiPrivate Qt5::Test Qt5::DBus Qt5::X11Extras Qt5::QuickControls2 ${QT5PLATFORMSUPPORT_LIBS} KF5::ConfigWidgets KF5::ConfigCore KF5::IconThemes KF5::KIOFileWidgets KF5::I18n KF5::Notifications KF5::WindowSystem KF5::WaylandClient XCB::XCB)
endmacro()
set(platformThemeSRCS
......
......@@ -17,9 +17,6 @@ configure_file(config-platformtheme.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-p
remove_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
set(platformtheme_SRCS
qdbusmenubar.cpp # fork of Qt's qdbusmenubar with some added setters for our convenience
kdeplatformtheme.cpp
......@@ -39,6 +36,7 @@ add_library(KDEPlasmaPlatformTheme MODULE ${platformtheme_SRCS})
target_link_libraries(KDEPlasmaPlatformTheme
PRIVATE
Qt5::GuiPrivate
Qt5::DBus
Qt5::X11Extras
Qt5::QuickControls2
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment