diff --git a/CMakeLists.txt b/CMakeLists.txt index 452a764..917a700 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,22 +44,7 @@ list(APPEND CMAKE_MODULE_PATH "${LCS_MODULE_PATH}") include(LiriSetup) ## Features: -option(LIRI_SESSION_DEVELOPMENT_BUILD "Development build" OFF) -add_feature_info("Session::DevelopmentBuild" LIRI_SESSION_DEVELOPMENT_BUILD "Build for development") -option(LIRI_ENABLE_SYSTEMD "Enable systemd support" ON) -add_feature_info("Liri::Systemd" LIRI_ENABLE_SYSTEMD "Enable systemd support") - -## Find Qt: -set(QT_MIN_VERSION "6.6.0") -find_package(Qt6 "${QT_MIN_VERSION}" - REQUIRED - COMPONENTS - Core - DBus - Xml - Gui - LinguistTools -) +include(features.cmake) ## Add subdirectories: add_subdirectory(data/menu) diff --git a/features.cmake b/features.cmake new file mode 100644 index 0000000..8e158b4 --- /dev/null +++ b/features.cmake @@ -0,0 +1,29 @@ +# SPDX-FileCopyrightText: 2024 Pier Luigi Fiorini +# SPDX-License-Identifier: BSD-3-Clause + +include(FeatureSummary) + +## Find Qt: +set(QT_MIN_VERSION "6.6.0") +find_package(Qt6 "${QT_MIN_VERSION}" + REQUIRED + COMPONENTS + Core + DBus + Xml + Gui + LinguistTools +) + +#### Features + +option(LIRI_SESSION_DEVELOPMENT_BUILD "Development build" OFF) +add_feature_info("Session::DevelopmentBuild" LIRI_SESSION_DEVELOPMENT_BUILD "Build for development") + +option(LIRI_ENABLE_SYSTEMD "Enable systemd support" ON) +add_feature_info("Liri::Systemd" LIRI_ENABLE_SYSTEMD "Enable systemd support") + +## Features summary: +if(NOT LIRI_SUPERBUILD) + feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES) +endif()