From 09fdd9ad9ea974d1444d97bff1330a94f83a6889 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Thu, 2 May 2024 13:48:28 +0200 Subject: [PATCH] AppStatisticMonitor: Move build as a separate package Change-Id: I93c9e1e6feb043531f70023ffe6cd74a1d2d95e5 Reviewed-by: Eike Ziller --- .../appstatisticsmonitor/CMakeLists.txt | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/plugins/appstatisticsmonitor/CMakeLists.txt b/src/plugins/appstatisticsmonitor/CMakeLists.txt index 292eb2a3eb2..92ae05962c9 100644 --- a/src/plugins/appstatisticsmonitor/CMakeLists.txt +++ b/src/plugins/appstatisticsmonitor/CMakeLists.txt @@ -1,10 +1,34 @@ +cmake_minimum_required(VERSION 3.16) + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake") + +project(AppStatisticMonitor) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + find_package(Qt6 COMPONENTS Charts QUIET) +if (NOT QT_CREATOR_API_DEFINED) + # standalone build + set(DESTINATION DESTINATION .) + include(QtCreatorIDEBranding) + include(QtCreatorAPI) + qtc_handle_compiler_cache_support() + + find_package(QtCreator COMPONENTS Core ProjectExplorer Utils REQUIRED) +endif() + + add_qtc_plugin(AppStatisticsMonitor CONDITION TARGET Qt6::Charts - DEPENDS Qt6::Charts SKIP_TRANSLATION - PLUGIN_DEPENDS Core ProjectExplorer + DEPENDS Qt6::Charts QtCreator::Utils + PLUGIN_DEPENDS QtCreator::Core QtCreator::ProjectExplorer SOURCES appstatisticsmonitorplugin.cpp chart.cpp chart.h