Skip to content

Commit

Permalink
Move features to features.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
plfiorini committed Dec 29, 2023
1 parent f2c4eb7 commit 9f4f2db
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
17 changes: 1 addition & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
29 changes: 29 additions & 0 deletions features.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SPDX-FileCopyrightText: 2024 Pier Luigi Fiorini <[email protected]>
# 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()

0 comments on commit 9f4f2db

Please sign in to comment.