Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwinrules/CMakeLists.txt
1 | # KI18N Translation Domain for this library | 1 | # KI18N Translation Domain for this library | ||
---|---|---|---|---|---|
2 | add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwinrules\") | 2 | add_definitions(-DTRANSLATION_DOMAIN=\"kcmkwinrules\") | ||
3 | add_definitions(-DKCMRULES) | 3 | add_definitions(-DKCMRULES) | ||
4 | | ||||
4 | ########### next target ############### | 5 | ########### next target ############### | ||
5 | 6 | | |||
6 | include_directories(../../) | 7 | include_directories(../../) | ||
7 | set(kwinrules_MOC_HDRS yesnobox.h ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h) | 8 | set(kwinrules_MOC_HDRS ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h) | ||
8 | qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS}) | 9 | qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS}) | ||
9 | set(kwinrules_SRCS ../../rulebooksettings.cpp ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp main.cpp ${kwinrules_MOC_SRCS}) | | |||
10 | 10 | | |||
11 | ki18n_wrap_ui(kwinrules_SRCS ruleslist.ui detectwidget.ui editshortcut.ui ruleswidgetbase.ui) | 11 | set(kwinrules_SRCS | ||
12 | ../../rulebooksettings.cpp | ||||
13 | optionsmodel.cpp | ||||
14 | ruleitem.cpp | ||||
15 | rulesmodel.cpp | ||||
16 | rulesdialog.cpp | ||||
17 | main.cpp | ||||
18 | kwinsrc.cpp | ||||
19 | ${kwinrules_MOC_SRCS} | ||||
20 | ) | ||||
12 | 21 | | |||
13 | kconfig_add_kcfg_files(kwinrules_SRCS ../../rulesettings.kcfgc) | 22 | kconfig_add_kcfg_files(kwinrules_SRCS ../../rulesettings.kcfgc) | ||
14 | kconfig_add_kcfg_files(kwinrules_SRCS ../../rulebooksettingsbase.kcfgc) | 23 | kconfig_add_kcfg_files(kwinrules_SRCS ../../rulebooksettingsbase.kcfgc) | ||
15 | 24 | | |||
16 | add_executable(kwin_rules_dialog ${kwinrules_SRCS}) | 25 | add_executable(kwin_rules_dialog ${kwinrules_SRCS}) | ||
17 | 26 | | |||
18 | set(kwin_kcm_rules_XCB_LIBS | 27 | set(kwin_kcm_rules_XCB_LIBS | ||
19 | XCB::CURSOR | 28 | XCB::CURSOR | ||
20 | XCB::XCB | 29 | XCB::XCB | ||
21 | XCB::XFIXES | 30 | XCB::XFIXES | ||
22 | ) | 31 | ) | ||
23 | 32 | | |||
24 | set(kcm_libs | 33 | set(kcm_libs | ||
25 | Qt5::Concurrent | 34 | Qt5::Concurrent | ||
26 | Qt5::X11Extras | 35 | Qt5::X11Extras | ||
36 | Qt5::QuickWidgets | ||||
27 | 37 | | |||
28 | KF5::Completion | 38 | KF5::Completion | ||
29 | KF5::ConfigWidgets | 39 | KF5::ConfigWidgets | ||
30 | KF5::I18n | 40 | KF5::I18n | ||
31 | KF5::Service | 41 | KF5::Service | ||
32 | KF5::WindowSystem | 42 | KF5::WindowSystem | ||
33 | KF5::XmlGui | 43 | KF5::XmlGui | ||
34 | ) | 44 | ) | ||
35 | 45 | | |||
36 | if (KWIN_BUILD_ACTIVITIES) | 46 | if (KWIN_BUILD_ACTIVITIES) | ||
37 | set(kcm_libs ${kcm_libs} KF5::Activities) | 47 | set(kcm_libs ${kcm_libs} KF5::Activities) | ||
38 | endif() | 48 | endif() | ||
39 | 49 | | |||
40 | target_link_libraries(kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) | 50 | target_link_libraries(kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) | ||
41 | 51 | | |||
42 | install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR}) | 52 | install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR}) | ||
43 | 53 | | |||
44 | ########### next target ############### | 54 | ########### next target ############### | ||
45 | 55 | | |||
46 | set(kcm_kwinrules_PART_SRCS kcm.cpp ${kwinrules_SRCS}) | 56 | set(kcmkwinrules_qml_SRCS | ||
57 | kcmrules.cpp | ||||
58 | ${kwinrules_SRCS} | ||||
59 | ) | ||||
60 | | ||||
61 | add_library(kcm_kwinrules_qml MODULE ${kcmkwinrules_qml_SRCS}) | ||||
62 | | ||||
63 | target_link_libraries(kcm_kwinrules_qml | ||||
64 | Qt5::Quick | ||||
65 | | ||||
66 | KF5::I18n | ||||
67 | KF5::ConfigWidgets | ||||
68 | KF5::CoreAddons | ||||
69 | KF5::QuickAddons | ||||
70 | KF5::WindowSystem | ||||
71 | | ||||
72 | ${kcm_libs} | ||||
73 | ${kwin_kcm_rules_XCB_LIBS} | ||||
74 | ) | ||||
47 | 75 | | |||
48 | add_library(kcm_kwinrules MODULE ${kcm_kwinrules_PART_SRCS}) | 76 | kcoreaddons_desktop_to_json(kcm_kwinrules_qml "kcm_kwinrules_qml.desktop" SERVICE_TYPES kcmodule.desktop) | ||
49 | 77 | | |||
50 | target_link_libraries(kcm_kwinrules ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) | 78 | # This desktop file is installed only for retrocompatibility with sycoca | ||
79 | install(TARGETS kcm_kwinrules_qml DESTINATION ${KDE_INSTALL_PLUGINDIR}/kcms) | ||||
80 | install(FILES kcm_kwinrules_qml.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) | ||||
51 | 81 | | |||
52 | install(TARGETS kcm_kwinrules DESTINATION ${PLUGIN_INSTALL_DIR}) | 82 | kpackage_install_package(package kcm_kwinrules_qml kcms) | ||
53 | 83 | | |||
54 | ########### install files ############### | 84 | ########### install files ############### | ||
55 | 85 | | |||
56 | install(FILES kwinrules.desktop DESTINATION ${SERVICES_INSTALL_DIR}) | 86 | install(FILES kwinrules.desktop DESTINATION ${SERVICES_INSTALL_DIR}) |