X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=CMakeLists.txt;h=d6408ec8db956ca1163cf2348afc640dece8e842;hp=2326479a585ae211de87060cf90847593b589078;hb=refs%2Fheads%2Fmaster;hpb=6b2e1320fae530d918e617bbf2eab7b34e454498 diff --git a/CMakeLists.txt b/CMakeLists.txt index 2326479..42b28dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,39 +1,88 @@ +# Copyright 2022-2023 Soren Stoutner . +# +# This file is part of Privacy Browser PC . +# +# Privacy Browser PC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Privacy Browser PC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Privacy Browser PC. If not, see . + + +# Set the minimum CMake version. cmake_minimum_required(VERSION 3.16) -project(privacybrowserpc) +# Name the project. +project(privacybrowser) +# Set the minimum framework versions. set(QT_MIN_VERSION "5.15.0") -set(KF_MIN_VERSION "5.83.0") +set(KDE_FRAMEWORKS_MIN_VERSION "5.83.0") -find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE) +# Load the Extra CMake Modules that correspond to the KDE Frameworks version. +find_package(ECM ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED NO_MODULE) + +# Set the CMake module path. set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) +# Include the KDE modules. include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) +# Include the Extra CMake Modules. include(ECMInstallIcons) include(ECMQtDeclareLoggingCategory) include(FeatureSummary) -find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets) +# Include the Position Independent Executable checker. +include(CheckPIESupported) + +# Check to see if Position Independent Executable is supported in the current linker and environment. +check_pie_supported() + +# Add the Position Independent Executable compiler flag if it is supported in the current linker and environment. +set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) + +# Load the Qt components. +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Gui + PrintSupport + Sql + WebEngineCore + WebEngineWidgets + Widgets +) -find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS +# Load the KDE Frameworks components. +find_package(KF5 ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED COMPONENTS + Completion ConfigWidgets CoreAddons Crash DBusAddons DocTools I18n + Notifications + KIO XmlGui ) +# Add the subdirectories. add_subdirectory(doc) add_subdirectory(src) -add_subdirectory(icons) -# Make it possible to use the po files fetched by the fetch-translations step -ki18n_install(po) -kdoctools_install(po) +# Install the PO files. These should be enabled once there are PO translations. +#ki18n_install(po) +#kdoctools_install(po) +# Generate a summary. feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)