diff --git a/CMakeLists.txt b/CMakeLists.txt index 382b94af..3b27a5a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,97 +1,97 @@ cmake_minimum_required(VERSION 3.0) project(ksysguard) set(PROJECT_VERSION "5.19.0") set(KSYSGUARD_VERSION 4.98.0) set(KSYSGUARD_STRING_VERSION "${KSYSGUARD_VERSION}") set(QT_MIN_VERSION "5.14.0") set(KF5_MIN_VERSION "5.58.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include(CheckIncludeFiles) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDEClangFormat) include(ECMAddTests) include(ECMInstallIcons) include(FeatureSummary) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets Test ) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config CoreAddons DBusAddons DocTools I18n IconThemes Init ItemViews KIO NewStuff Notifications WindowSystem ) find_package(KSysGuard REQUIRED) add_definitions(-DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DQT_USE_QSTRINGBUILDER) #add_definitions(-DQT_NO_CAST_FROM_ASCII) #add_definitions(-DQT_NO_CAST_TO_ASCII) #add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000) if (EXISTS "${CMAKE_SOURCE_DIR}/.git") add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000) add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x054200) endif() find_package(Sensors) set_package_properties(Sensors PROPERTIES TYPE OPTIONAL PURPOSE "Allows to show sensor information") find_package(libpcap) set_package_properties( libpcap PROPERTIES TYPE RECOMMENDED PURPOSE "libpcap is used for per-application network usage." ) if (libpcap_FOUND) find_package(Libcap) set_package_properties(Libcap PROPERTIES TYPE OPTIONAL PURPOSE "Needed for setting capabilities of the per-application network plugin." ) endif() include_directories(${CMAKE_CURRENT_BINARY_DIR}) configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h) add_subdirectory( gui ) add_subdirectory( doc ) add_subdirectory( pics ) add_subdirectory( example ) add_subdirectory( ksysguardd ) -add_subdirectory(kstats) +add_subdirectory(ksystemstats) add_subdirectory(libkstats) add_subdirectory( plugins ) # add clang-format target for all our real source files file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/kstats/CMakeLists.txt b/kstats/CMakeLists.txt deleted file mode 100644 index e6ecb005..00000000 --- a/kstats/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -set(SOURCES - client.cpp - ksysguarddaemon.cpp -) - -set_source_files_properties("ksysguard_iface.xml" - PROPERTIES INCLUDE "../ksysguard-backend/types.h" ) -qt5_add_dbus_adaptor(SOURCES "ksysguard_iface.xml" ksysguarddaemon.h KSysGuardDaemon) - -add_library(kstats_core STATIC ${SOURCES}) -target_link_libraries(kstats_core PUBLIC Qt5::Core Qt5::DBus KF5::CoreAddons KSysGuard::StatsBackend ) - -add_executable(kstats main.cpp) -target_link_libraries(kstats kstats_core) - -install(TARGETS kstats DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) - -kdbusaddons_generate_dbus_service_file(kstats org.kde.kstats ${KDE_INSTALL_FULL_BINDIR}) - -add_subdirectory(test) - -if (BUILD_TESTING) - add_subdirectory(autotests) -endif() diff --git a/ksystemstats/CMakeLists.txt b/ksystemstats/CMakeLists.txt new file mode 100644 index 00000000..03cb4a85 --- /dev/null +++ b/ksystemstats/CMakeLists.txt @@ -0,0 +1,24 @@ +set(SOURCES + client.cpp + ksysguarddaemon.cpp +) + +set_source_files_properties("ksysguard_iface.xml" + PROPERTIES INCLUDE "../ksysguard-backend/types.h" ) +qt5_add_dbus_adaptor(SOURCES "ksysguard_iface.xml" ksysguarddaemon.h KSysGuardDaemon) + +add_library(ksystemstats_core STATIC ${SOURCES}) +target_link_libraries(ksystemstats_core PUBLIC Qt5::Core Qt5::DBus KF5::CoreAddons KSysGuard::StatsBackend ) + +add_executable(ksystemstats main.cpp) +target_link_libraries(ksystemstats ksystemstats_core) + +install(TARGETS ksystemstats DESTINATION ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) + +kdbusaddons_generate_dbus_service_file(ksystemstats org.kde.ksystemstats ${KDE_INSTALL_FULL_BINDIR}) + +add_subdirectory(test) + +if (BUILD_TESTING) + add_subdirectory(autotests) +endif() diff --git a/kstats/autotests/CMakeLists.txt b/ksystemstats/autotests/CMakeLists.txt similarity index 79% rename from kstats/autotests/CMakeLists.txt rename to ksystemstats/autotests/CMakeLists.txt index 66dd25bd..c4e47000 100644 --- a/kstats/autotests/CMakeLists.txt +++ b/ksystemstats/autotests/CMakeLists.txt @@ -1,15 +1,15 @@ include(ECMAddTests) set(SOURCES main.cpp ) set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/../ksysguard_iface.xml" PROPERTIES INCLUDE "../../libkstats/types.h" ) qt5_add_dbus_interface(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../ksysguard_iface.xml" kstatsiface) ecm_add_test( ${SOURCES} - TEST_NAME kstatstest - LINK_LIBRARIES Qt5::Test kstats_core + TEST_NAME ksystemstatstest + LINK_LIBRARIES Qt5::Test ksystemstats_core ) diff --git a/kstats/autotests/main.cpp b/ksystemstats/autotests/main.cpp similarity index 100% rename from kstats/autotests/main.cpp rename to ksystemstats/autotests/main.cpp diff --git a/kstats/client.cpp b/ksystemstats/client.cpp similarity index 100% rename from kstats/client.cpp rename to ksystemstats/client.cpp diff --git a/kstats/client.h b/ksystemstats/client.h similarity index 100% rename from kstats/client.h rename to ksystemstats/client.h diff --git a/kstats/ksysguard_iface.xml b/ksystemstats/ksysguard_iface.xml similarity index 100% rename from kstats/ksysguard_iface.xml rename to ksystemstats/ksysguard_iface.xml diff --git a/kstats/ksysguarddaemon.cpp b/ksystemstats/ksysguarddaemon.cpp similarity index 100% rename from kstats/ksysguarddaemon.cpp rename to ksystemstats/ksysguarddaemon.cpp diff --git a/kstats/ksysguarddaemon.h b/ksystemstats/ksysguarddaemon.h similarity index 100% rename from kstats/ksysguarddaemon.h rename to ksystemstats/ksysguarddaemon.h diff --git a/kstats/main.cpp b/ksystemstats/main.cpp similarity index 100% rename from kstats/main.cpp rename to ksystemstats/main.cpp diff --git a/kstats/test/CMakeLists.txt b/ksystemstats/test/CMakeLists.txt similarity index 100% rename from kstats/test/CMakeLists.txt rename to ksystemstats/test/CMakeLists.txt diff --git a/kstats/test/README.txt b/ksystemstats/test/README.txt similarity index 100% rename from kstats/test/README.txt rename to ksystemstats/test/README.txt diff --git a/kstats/test/main.cpp b/ksystemstats/test/main.cpp similarity index 100% rename from kstats/test/main.cpp rename to ksystemstats/test/main.cpp