]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blob - src/CMakeLists.txt
Add a default folder icon to the edit folder dialog. https://redmine.stoutner.com...
[PrivacyBrowserPC.git] / src / 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 <http://www.gnu.org/licenses/>.
17
18 # Create the executable and add the resources.
19 add_executable(privacybrowser resources.qrc)
20
21 # List the sources to include in the executable.
22 target_sources(privacybrowser PRIVATE
23     main.cpp
24 )
25
26 # Add the Qt logging category.  This will create the `debug.h` header file.
27 ecm_qt_declare_logging_category(privacybrowser
28     HEADER debug.h
29     IDENTIFIER PRIVACYBROWSER
30     CATEGORY_NAME "privacybrowser"
31 )
32
33 # Include the KConfig controller file.
34 kconfig_add_kcfg_files(privacybrowser settings/Settings.kcfgc)
35
36 # Use KDE Frameworks to handle internationalization of the following UI files.
37 ki18n_wrap_ui(privacybrowser
38     uis/AddBookmarkDialog.ui
39     uis/AddFolderDialog.ui
40     uis/AddOrEditCookieDialog.ui
41     uis/AddTabWidget.ui
42     uis/BookmarksDialog.ui
43     uis/CookiesDialog.ui
44     uis/DomainSettingsDialog.ui
45     uis/DurableCookiesDialog.ui
46     uis/EditBookmarkDialog.ui
47     uis/EditFolderDialog.ui
48     uis/HttpAuthenticationDialog.ui
49     uis/SaveDialog.ui
50     uis/SettingsGeneral.ui
51     uis/SettingsPrivacy.ui
52     uis/SettingsSpellCheck.ui
53     uis/TabWidget.ui
54 )
55
56 # Link the following libraries.
57 target_link_libraries(privacybrowser
58     Qt5::Core
59     Qt5::Gui
60     Qt5::Sql
61     Qt5::PrintSupport
62     Qt5::Widgets
63     Qt5::WebEngineCore
64     Qt5::WebEngineWidgets
65     KF5::Completion
66     KF5::ConfigWidgets
67     KF5::CoreAddons
68     KF5::Crash
69     KF5::DBusAddons
70     KF5::DocTools
71     KF5::I18n
72     KF5::Notifications
73     KF5::KIOCore
74     KF5::KIOWidgets
75     KF5::XmlGui
76 )
77
78 # Add the subdirectories.
79 add_subdirectory(databases)
80 add_subdirectory(delegates)
81 add_subdirectory(dialogs)
82 add_subdirectory(filters)
83 add_subdirectory(helpers)
84 add_subdirectory(interceptors)
85 add_subdirectory(ui.rcs)
86 add_subdirectory(widgets)
87 add_subdirectory(windows)
88
89 # Install Privacy Browser using the default KDE arguments.
90 install(TARGETS privacybrowser ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
91
92 # Install Privacy Browser according to the instructions in the desktop file, specifying the permissions.
93 install(PROGRAMS com.stoutner.privacybrowser.desktop DESTINATION ${KDE_INSTALL_APPDIR} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
94
95 # Install the metadata file.
96 install(FILES com.stoutner.privacybrowser.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
97
98 # Install the notifyrc file.
99 install(FILES privacybrowser.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
100
101 # Install the standard icons.
102 ecm_install_icons(ICONS icons/sc-apps-privacybrowser.svg DESTINATION ${KDE_INSTALL_ICONDIR})
103 ecm_install_icons(ICONS icons/16-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
104 ecm_install_icons(ICONS icons/22-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
105 ecm_install_icons(ICONS icons/24-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
106 ecm_install_icons(ICONS icons/32-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
107 ecm_install_icons(ICONS icons/48-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
108 ecm_install_icons(ICONS icons/64-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
109 ecm_install_icons(ICONS icons/128-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
110 ecm_install_icons(ICONS icons/256-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
111 ecm_install_icons(ICONS icons/512-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
112 ecm_install_icons(ICONS icons/1024-apps-privacybrowser.png DESTINATION ${KDE_INSTALL_ICONDIR})
113
114 # Install the symbolic icon (used by Gnome).
115 install(FILES icons/privacybrowser-symbolic.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/symbolic/apps/)