Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
1 | # common - configure file and version definitions | 1 | # common - configure file and version definitions | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h) | 3 | configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h) | ||
4 | set(CMAKE_AUTORCC 1) | 4 | set(CMAKE_AUTORCC 1) | ||
5 | 5 | | |||
6 | # target | | |||
7 | | ||||
8 | if(XCB_FOUND) | | |||
9 | set( | | |||
10 | SPECTACLE_SRCS_PLATFORM_XCB | | |||
11 | Platforms/PlatformXcb.cpp | | |||
12 | ) | | |||
13 | endif() | | |||
14 | | ||||
15 | set( | | |||
16 | SPECTACLE_SRCS_PLATFORM | | |||
17 | Platforms/PlatformLoader.cpp | | |||
18 | Platforms/Platform.cpp | | |||
19 | Platforms/PlatformNull.cpp | | |||
20 | Platforms/PlatformKWinWayland.cpp | | |||
21 | ${SPECTACLE_SRCS_PLATFORM_XCB} | | |||
22 | ) | | |||
23 | | ||||
24 | set( | 6 | set( | ||
25 | SPECTACLE_SRCS_DEFAULT | 7 | SPECTACLE_SRCS_DEFAULT | ||
26 | Main.cpp | 8 | Main.cpp | ||
27 | ExportManager.cpp | 9 | ExportManager.cpp | ||
28 | SpectacleCore.cpp | 10 | SpectacleCore.cpp | ||
29 | SpectacleConfig.cpp | 11 | SpectacleConfig.cpp | ||
30 | SpectacleDBusAdapter.cpp | 12 | SpectacleDBusAdapter.cpp | ||
31 | ${SPECTACLE_SRCS_PLATFORM} | 13 | BackendInterfaces/ScreenshotInterface.h | ||
32 | Gui/KSMainWindow.cpp | 14 | Gui/KSMainWindow.cpp | ||
33 | Gui/KSWidget.cpp | 15 | Gui/KSWidget.cpp | ||
34 | Gui/KSImageWidget.cpp | 16 | Gui/KSImageWidget.cpp | ||
35 | Gui/ExportMenu.cpp | 17 | Gui/ExportMenu.cpp | ||
36 | Gui/ProgressButton.cpp | 18 | Gui/ProgressButton.cpp | ||
37 | Gui/SmartSpinBox.cpp | 19 | Gui/SmartSpinBox.cpp | ||
38 | Gui/SettingsDialog/SettingsDialog.cpp | 20 | Gui/SettingsDialog/SettingsDialog.cpp | ||
39 | Gui/SettingsDialog/SettingsPage.cpp | 21 | Gui/SettingsDialog/SettingsPage.cpp | ||
40 | Gui/SettingsDialog/SaveOptionsPage.cpp | 22 | Gui/SettingsDialog/SaveOptionsPage.cpp | ||
41 | Gui/SettingsDialog/GeneralOptionsPage.cpp | 23 | Gui/SettingsDialog/GeneralOptionsPage.cpp | ||
42 | Gui/SettingsDialog/ShortcutsOptionsPage.cpp | 24 | Gui/SettingsDialog/ShortcutsOptionsPage.cpp | ||
25 | Gui/SettingsDialog/BackendOptionsPage.cpp | ||||
43 | QuickEditor/QuickEditor.cpp | 26 | QuickEditor/QuickEditor.cpp | ||
44 | ) | 27 | ) | ||
45 | 28 | | |||
46 | ecm_qt_declare_logging_category(SPECTACLE_SRCS_DEFAULT HEADER spectacle_core_debug.h IDENTIFIER SPECTACLE_CORE_LOG CATEGORY_NAME org.kde.spectacle.core) | 29 | ecm_qt_declare_logging_category(SPECTACLE_SRCS_DEFAULT HEADER spectacle_core_debug.h IDENTIFIER SPECTACLE_CORE_LOG CATEGORY_NAME org.kde.spectacle.core) | ||
47 | ecm_qt_declare_logging_category(SPECTACLE_SRCS_DEFAULT HEADER spectacle_gui_debug.h IDENTIFIER SPECTACLE_GUI_LOG CATEGORY_NAME org.kde.spectacle.gui) | 30 | ecm_qt_declare_logging_category(SPECTACLE_SRCS_DEFAULT HEADER spectacle_gui_debug.h IDENTIFIER SPECTACLE_GUI_LOG CATEGORY_NAME org.kde.spectacle.gui) | ||
48 | 31 | | |||
49 | if(KIPI_FOUND) | 32 | if(KIPI_FOUND) | ||
50 | set( | 33 | set( | ||
Show All 11 Lines | 43 | SPECTACLE_SRCS_ALL | |||
62 | ${SPECTACLE_SRCS_KIPI} | 45 | ${SPECTACLE_SRCS_KIPI} | ||
63 | ) | 46 | ) | ||
64 | 47 | | |||
65 | add_executable( | 48 | add_executable( | ||
66 | spectacle | 49 | spectacle | ||
67 | ${SPECTACLE_SRCS_ALL} | 50 | ${SPECTACLE_SRCS_ALL} | ||
68 | ) | 51 | ) | ||
69 | 52 | | |||
70 | # link libraries | 53 | # build plugins | ||
54 | add_library(XcbKWinScreenshotPlugin SHARED BackendPlugins/XcbKWinScreenshotPlugin.cpp BackendInterfaces/ScreenshotInterface.h) | ||||
55 | target_link_libraries(XcbKWinScreenshotPlugin | ||||
56 | Qt5::Widgets Qt5::DBus Qt5::X11Extras | ||||
57 | KF5::WindowSystem | ||||
58 | XCB::XFIXES XCB::IMAGE XCB::CURSOR XCB::UTIL | ||||
59 | ) | ||||
60 | | ||||
61 | add_library(WaylandKWinScreenshotPlugin SHARED BackendPlugins/WaylandKWinScreenshotPlugin.cpp BackendInterfaces/ScreenshotInterface.h) | ||||
62 | target_link_libraries(WaylandKWinScreenshotPlugin | ||||
63 | Qt5::Widgets Qt5::DBus Qt5::Concurrent | ||||
64 | ) | ||||
65 | | ||||
66 | add_library(XcbScreenshotPlugin SHARED BackendPlugins/XcbScreenshotPlugin.cpp BackendInterfaces/ScreenshotInterface.h) | ||||
67 | target_link_libraries(XcbScreenshotPlugin | ||||
68 | Qt5::Widgets Qt5::X11Extras | ||||
69 | KF5::WindowSystem | ||||
70 | XCB::XFIXES XCB::IMAGE XCB::CURSOR XCB::UTIL | ||||
71 | ) | ||||
71 | 72 | | |||
73 | # link libraries | ||||
72 | target_link_libraries( | 74 | target_link_libraries( | ||
73 | spectacle | 75 | spectacle | ||
74 | Qt5::DBus | | |||
75 | Qt5::PrintSupport | 76 | Qt5::PrintSupport | ||
77 | Qt5::X11Extras | ||||
76 | KF5::CoreAddons | 78 | KF5::CoreAddons | ||
77 | KF5::DBusAddons | 79 | KF5::DBusAddons | ||
78 | KF5::WidgetsAddons | 80 | KF5::WidgetsAddons | ||
79 | KF5::Notifications | 81 | KF5::Notifications | ||
80 | KF5::ConfigCore | 82 | KF5::ConfigCore | ||
81 | KF5::I18n | 83 | KF5::I18n | ||
82 | KF5::KIOWidgets | 84 | KF5::KIOWidgets | ||
83 | KF5::WindowSystem | 85 | KF5::WindowSystem | ||
84 | KF5::NewStuff | 86 | KF5::NewStuff | ||
85 | KF5::GlobalAccel | 87 | KF5::GlobalAccel | ||
86 | KF5::XmlGui | 88 | KF5::XmlGui | ||
87 | ) | | |||
88 | | ||||
89 | if(XCB_FOUND) | | |||
90 | target_link_libraries( | | |||
91 | spectacle | | |||
92 | XCB::XFIXES | | |||
93 | XCB::IMAGE | | |||
94 | XCB::CURSOR | | |||
95 | XCB::UTIL | 89 | XCB::UTIL | ||
96 | Qt5::X11Extras | | |||
97 | ) | 90 | ) | ||
98 | endif() | | |||
99 | 91 | | |||
100 | if(KIPI_FOUND) | 92 | if(KIPI_FOUND) | ||
101 | target_link_libraries ( | 93 | target_link_libraries ( | ||
102 | spectacle | 94 | spectacle | ||
103 | KF5::Kipi | 95 | KF5::Kipi | ||
104 | ) | 96 | ) | ||
105 | endif() | 97 | endif() | ||
106 | 98 | | |||
107 | if(PURPOSE_FOUND) | 99 | if(PURPOSE_FOUND) | ||
108 | target_link_libraries ( | 100 | target_link_libraries ( | ||
109 | spectacle | 101 | spectacle | ||
110 | KF5::PurposeWidgets | 102 | KF5::PurposeWidgets | ||
111 | ) | 103 | ) | ||
112 | endif() | 104 | endif() | ||
113 | 105 | | |||
114 | install(TARGETS spectacle ${INSTALL_TARGETS_DEFAULT_ARGS}) | 106 | install(TARGETS spectacle ${INSTALL_TARGETS_DEFAULT_ARGS}) |