Commit 07811d9a authored by Fabian Vogt's avatar Fabian Vogt
Browse files

Introduce cmake options to disable backends

Some distros only ship either firewalld or UFW, so provide an option to disable
building and installing backends.
parent e1eacaf9
......@@ -14,6 +14,18 @@ set(QT_MIN_VERSION "5.14.0")
set(CMAKE_AUTOMOC TRUE)
set(CMAKE_AUTORCC TRUE)
#-----------------------------------------------------------------------------
# OPTIONS
#-----------------------------------------------------------------------------
include(FeatureSummary)
option(BUILD_FIREWALLD_BACKEND "Build the firewalld backend" ON)
add_feature_info(FIREWALLD_BACKEND ${BUILD_FIREWALLD_BACKEND} "Build the FirewallD backend")
option(BUILD_UFW_BACKEND "Build the Uncomplicated Firewall (UFW) backend" ON)
add_feature_info(UFW_BACKEND ${BUILD_UFW_BACKEND} "Build the Uncomplicated Firewall (UFW) backend")
#-----------------------------------------------------------------------------
# DEPENDENCIES
#-----------------------------------------------------------------------------
......@@ -36,8 +48,6 @@ include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
include(FeatureSummary)
find_package(KF5 REQUIRED COMPONENTS
CoreAddons
KCMUtils
......
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: 2020 Tomaz Canabrava <tcanabrava@kde.org>
add_subdirectory(firewalld)
add_subdirectory(ufw)
if(BUILD_FIREWALLD_BACKEND)
add_subdirectory(firewalld)
endif()
if(BUILD_UFW_BACKEND)
add_subdirectory(ufw)
endif()
add_subdirectory(netstat)
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