Commit 8f5e7258 authored by Laurent Montel's avatar Laurent Montel
Browse files

Adapt build system against qt6

parent 866d8ceb
Pipeline #136002 passed with stage
in 1 minute and 20 seconds
......@@ -30,16 +30,16 @@ include(CheckLibraryExists)
include(FeatureSummary)
include(GenerateExportHeader)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS DBus Network Widgets Qml Quick)
find_package(Qt5WebEngineWidgets ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt5WebEngineWidgets PROPERTIES
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS DBus Network Widgets Qml Quick)
find_package(Qt${QT_MAJOR_VERSION}WebEngineWidgets ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt${QT_MAJOR_VERSION}WebEngineWidgets PROPERTIES
URL "git://code.qt.org/qt/qtwebenginewidgets.git"
DESCRIPTION "Qt WebEngine module (web browsing engine)"
TYPE OPTIONAL
PURPOSE "Used by the HTML-based GUI ksysguard library"
)
find_package(Qt5WebChannel ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt5WebChannel PROPERTIES
find_package(Qt${QT_MAJOR_VERSION}WebChannel ${QT_MIN_VERSION} CONFIG)
set_package_properties(Qt${QT_MAJOR_VERSION}WebChannel PROPERTIES
URL "git://code.qt.org/qt/qtwebchannel.git"
DESCRIPTION "Qt WebChannel module"
TYPE OPTIONAL
......@@ -81,7 +81,7 @@ if(X11_FOUND)
endif()
set(WEBENGINE_SCRIPTING_ENABLED FALSE)
if(Qt5WebEngineWidgets_FOUND AND Qt5WebChannel_FOUND)
if(Qt${QT_MAJOR_VERSION}WebEngineWidgets_FOUND AND Qt${QT_MAJOR_VERSION}WebChannel_FOUND)
set(WEBENGINE_SCRIPTING_ENABLED TRUE)
endif()
add_feature_info("Scripting plugin support" WEBENGINE_SCRIPTING_ENABLED "Support scripting plugins using WebEngine and WebChannel")
......
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Qt5Core @QT_MIN_VERSION@)
find_dependency(Qt5Network @QT_MIN_VERSION@)
find_dependency(Qt5Widgets @QT_MIN_VERSION@)
find_dependency(Qt@QT_MAJOR_VERSION@Core @QT_MIN_VERSION@)
find_dependency(Qt@QT_MAJOR_VERSION@Network @QT_MIN_VERSION@)
find_dependency(Qt@QT_MAJOR_VERSION@Widgets @QT_MIN_VERSION@)
find_dependency(KF5Config @KF5_MIN_VERSION@)
find_dependency(KF5I18n @KF5_MIN_VERSION@)
......
find_package(Qt5 REQUIRED CONFIG COMPONENTS Test)
find_package(Qt${QT_MAJOR_VERSION} REQUIRED CONFIG COMPONENTS Test)
include_directories(${libksysguard_SOURCE_DIR})
......
......@@ -32,6 +32,7 @@ qt_add_dbus_interface(dbusinterface_SRCS org.kde.ksystemstats.xml org.kde.ksyste
add_library(dbusinterface STATIC ${dbusinterface_SRCS})
set_target_properties(dbusinterface PROPERTIES CXX_VISIBILITY_PRESET default)
target_link_libraries(dbusinterface Qt::Core Qt::DBus KSysGuard::Formatter)
set_property(TARGET dbusinterface PROPERTY POSITION_INDEPENDENT_CODE ON)
add_library(SystemStats ${systemstats_SRCS})
add_library(KSysGuard::SystemStats ALIAS SystemStats)
......
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