]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blob - src/CMakeLists.txt
83718228956d13b1c920a0c0fd69ba3845ffe3a5
[PrivacyBrowserPC.git] / src / CMakeLists.txt
1 # Copyright © 2022 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 <http://www.gnu.org/licenses/>.
17
18 # Create the executable and add the resources.
19 add_executable(privacy-browser resources.qrc)
20
21 # List the sources to include in the executable.
22 target_sources(privacy-browser PRIVATE
23     main.cpp
24     MouseEventFilter.cpp
25 )
26
27 # Add the Qt logging category.  This will create the `debug.h` header file.
28 ecm_qt_declare_logging_category(privacy-browser
29     HEADER debug.h
30     IDENTIFIER PRIVACYBROWSER
31     CATEGORY_NAME "privacybrowser"
32 )
33
34 # Include the KConfig controller file.
35 kconfig_add_kcfg_files(privacy-browser settings/Settings.kcfgc)
36
37 # Use KDE Frameworks to handle internationalization of the following UI files.
38 ki18n_wrap_ui(privacy-browser
39     ui/BrowserView.ui
40     ui/DomainSettingsDialog.ui
41     ui/SettingsGeneral.ui
42     ui/SettingsPrivacy.ui
43 )
44
45 # Link the following libraries.
46 target_link_libraries(privacy-browser
47     Qt5::Core
48     Qt5::Gui
49     Qt5::Sql
50     Qt5::Widgets
51     Qt5::WebEngineCore
52     Qt5::WebEngineWidgets
53     KF5::Completion
54     KF5::ConfigWidgets
55     KF5::CoreAddons
56     KF5::Crash
57     KF5::DBusAddons
58     KF5::DocTools
59     KF5::I18n
60     KF5::XmlGui
61 )
62
63 # Add the subdirectories.
64 add_subdirectory(dialogs)
65 add_subdirectory(helpers)
66 add_subdirectory(interceptors)
67 add_subdirectory(ui.rc)
68 add_subdirectory(views)
69 add_subdirectory(windows)
70
71 # Install Privacy Browser using the default KDE arguments.
72 install(TARGETS privacy-browser ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
73
74 # Install Privacy Browser according to the instructions in the desktop file, specifying the permissions.
75 install(PROGRAMS com.stoutner.privacybrowser.desktop DESTINATION ${KDE_INSTALL_APPDIR} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
76
77 # Install Privacy Browser's metadata file.
78 install(FILES com.stoutner.privacybrowser.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
79
80 # Install Privacy Browser's icon.
81 ecm_install_icons(ICONS icons/sc-apps-privacy-browser.svg DESTINATION ${KDE_INSTALL_ICONDIR})