diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ 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 diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -13,8 +13,6 @@ 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 @@ 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 diff --git a/src/platformtheme/CMakeLists.txt b/src/platformtheme/CMakeLists.txt --- a/src/platformtheme/CMakeLists.txt +++ b/src/platformtheme/CMakeLists.txt @@ -17,9 +17,6 @@ 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 @@ target_link_libraries(KDEPlasmaPlatformTheme PRIVATE + Qt5::GuiPrivate Qt5::DBus Qt5::X11Extras Qt5::QuickControls2