1 # Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
3 # This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
5 # Privacy Browser PC is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # Privacy Browser PC is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>.
19 # Set the minimum CMake version.
20 cmake_minimum_required(VERSION 3.16)
23 project(privacybrowser)
25 # Set the minimum framework versions.
26 set(QT_MIN_VERSION "5.15.0")
27 set(KDE_FRAMEWORKS_MIN_VERSION "5.83.0")
29 # Load the Extra CMake Modules that correspond to the KDE Frameworks version.
30 find_package(ECM ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED NO_MODULE)
32 # Set the CMake module path.
33 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
35 # Include the KDE modules.
36 include(KDEInstallDirs)
37 include(KDECMakeSettings)
38 include(KDECompilerSettings NO_POLICY_SCOPE)
40 # Include the Extra CMake Modules.
41 include(ECMInstallIcons)
42 include(ECMQtDeclareLoggingCategory)
43 include(FeatureSummary)
45 # Load the Qt components.
46 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
55 # Load the KDE Frameworks components.
56 find_package(KF5 ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED COMPONENTS
67 # Add the subdirectories.
71 # Make it possible to use the PO files fetched by the fetch-translations step.
76 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)