]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blob - CMakeLists.txt
Fix displaying of the URL when opening a new tab from a link. https://redmine.stoutn...
[PrivacyBrowserPC.git] / CMakeLists.txt
1 # Copyright 2022-2024 Soren Stoutner <soren@stoutner.com>.
2 #
3 # This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
4 #
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.
9 #
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.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with Privacy Browser PC.  If not, see <https://www.gnu.org/licenses/>.
17
18
19 # Set the minimum CMake version.
20 cmake_minimum_required(VERSION 3.16)
21
22 # Name the project.
23 project(privacybrowser)
24
25 # Set the minimum framework versions.
26 set(QT_MIN_VERSION "5.15.0")
27 set(KDE_FRAMEWORKS_MIN_VERSION "5.83.0")
28
29 # Load the Extra CMake Modules that correspond to the KDE Frameworks version.
30 find_package(ECM ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED NO_MODULE)
31
32 # Set the CMake module path.
33 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
34
35 # Include the KDE modules.
36 include(KDEInstallDirs)
37 include(KDECMakeSettings)
38 include(KDECompilerSettings NO_POLICY_SCOPE)
39
40 # Include the Extra CMake Modules.
41 include(ECMInstallIcons)
42 include(ECMQtDeclareLoggingCategory)
43 include(FeatureSummary)
44
45 # Disable forcing of PIE, which appears to cause problems with Ubuntu's build system.  <https://bugs.launchpad.net/ubuntu/+source/privacybrowser/+bug/2078732>
46 # Include the Position Independent Executable checker.  <https://cmake.org/cmake/help/latest/policy/CMP0083.html>
47 #include(CheckPIESupported)
48
49 # Check to see if Position Independent Executable is supported in the current linker and environment.
50 #check_pie_supported()
51
52 # Add the Position Independent Executable compiler flag if it is supported in the current linker and environment.  <https://cmake.org/cmake/help/latest/variable/CMAKE_POSITION_INDEPENDENT_CODE.html>
53 #set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
54
55 # Load the Qt components.
56 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
57     Core
58     Gui
59     PrintSupport
60     Sql
61     WebEngineCore
62     WebEngineWidgets
63     Widgets
64 )
65
66 # Load the KDE Frameworks components.
67 find_package(KF5 ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED COMPONENTS
68     Completion
69     ConfigWidgets
70     CoreAddons
71     Crash
72     DBusAddons
73     DocTools
74     I18n
75     Notifications
76     KIO
77     XmlGui
78 )
79
80 # Add the subdirectories.
81 add_subdirectory(doc)
82 add_subdirectory(src)
83
84 # Install the PO files.  These should be enabled once there are PO translations.
85 #ki18n_install(po)
86 #kdoctools_install(po)
87
88 # Generate a summary.
89 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)