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/>.
18 # Create the executable and add the resources.
19 add_executable(privacy-browser resources.qrc)
21 # List the sources to include in the executable.
22 target_sources(privacy-browser PRIVATE
26 # Add the Qt logging category. This will create the `debug.h` header file.
27 ecm_qt_declare_logging_category(privacy-browser
29 IDENTIFIER PRIVACYBROWSER
30 CATEGORY_NAME "privacybrowser"
33 # Include the KConfig controller file.
34 kconfig_add_kcfg_files(privacy-browser settings/Settings.kcfgc)
36 # Use KDE Frameworks to handle internationalization of the following UI files.
37 ki18n_wrap_ui(privacy-browser
38 uis/AddOrEditCookieDialog.ui
41 uis/DomainSettingsDialog.ui
42 uis/DurableCookiesDialog.ui
44 uis/SettingsGeneral.ui
45 uis/SettingsPrivacy.ui
49 # Link the following libraries.
50 target_link_libraries(privacy-browser
70 # Add the subdirectories.
71 add_subdirectory(databases)
72 add_subdirectory(delegates)
73 add_subdirectory(dialogs)
74 add_subdirectory(filters)
75 add_subdirectory(helpers)
76 add_subdirectory(interceptors)
77 add_subdirectory(ui.rcs)
78 add_subdirectory(widgets)
79 add_subdirectory(windows)
81 # Install Privacy Browser using the default KDE arguments.
82 install(TARGETS privacy-browser ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
84 # Install Privacy Browser according to the instructions in the desktop file, specifying the permissions.
85 install(PROGRAMS com.stoutner.privacybrowser.desktop DESTINATION ${KDE_INSTALL_APPDIR} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
87 # Install Privacy Browser's metadata file.
88 install(FILES com.stoutner.privacybrowser.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
90 # Install Privacy Browser's notifyrc file.
91 install(FILES privacybrowser.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
93 # Install Privacy Browser's icon.
94 ecm_install_icons(ICONS icons/sc-apps-privacy-browser.svg DESTINATION ${KDE_INSTALL_ICONDIR})