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