Changeset View
Changeset View
Standalone View
Standalone View
kcms/keyboard/CMakeLists.txt
1 | add_definitions(-DTRANSLATION_DOMAIN=\"kcmkeyboard\") | 1 | add_definitions(-DTRANSLATION_DOMAIN=\"kcmkeyboard\") | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | add_subdirectory(tastenbrett) | ||||
4 | | ||||
3 | option(HAVE_XINPUT "X11 XInput" OFF) | 5 | option(HAVE_XINPUT "X11 XInput" OFF) | ||
4 | option(HAVE_UDEV "UDev" OFF) | 6 | option(HAVE_UDEV "UDev" OFF) | ||
5 | option(NEW_GEOMETRY "Keyboard geometry preview" OFF) | | |||
6 | 7 | | |||
7 | if (X11_Xinput_FOUND) | 8 | if (X11_Xinput_FOUND) | ||
8 | set(HAVE_XINPUT ON) | 9 | set(HAVE_XINPUT ON) | ||
9 | elseif (UDEV_FOUND) | 10 | elseif (UDEV_FOUND) | ||
10 | set(HAVE_UDEV ON) | 11 | set(HAVE_UDEV ON) | ||
11 | else() | 12 | else() | ||
12 | message(STATUS "X11 XInput and UDev is not found, either is required to keep layouts with keyboard hotplugging") | 13 | message(STATUS "X11 XInput and UDev is not found, either is required to keep layouts with keyboard hotplugging") | ||
13 | endif() | 14 | endif() | ||
14 | 15 | | |||
15 | | ||||
16 | ### kded daemon ### | 16 | ### kded daemon ### | ||
17 | 17 | | |||
18 | set( kded_keyboard_SRCS | 18 | set( kded_keyboard_SRCS | ||
19 | keyboard_daemon.cpp | 19 | keyboard_daemon.cpp | ||
20 | layout_memory.cpp | 20 | layout_memory.cpp | ||
21 | layout_memory_persister.cpp | 21 | layout_memory_persister.cpp | ||
22 | udev_helper.cpp | 22 | udev_helper.cpp | ||
23 | x11_helper.cpp | 23 | x11_helper.cpp | ||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | |||||
74 | 74 | | |||
75 | if (HAVE_UDEV) | 75 | if (HAVE_UDEV) | ||
76 | target_link_libraries(kded_keyboard ${UDEV_LIBS}) | 76 | target_link_libraries(kded_keyboard ${UDEV_LIBS}) | ||
77 | endif() | 77 | endif() | ||
78 | 78 | | |||
79 | install( TARGETS kded_keyboard DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kded ) | 79 | install( TARGETS kded_keyboard DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kded ) | ||
80 | 80 | | |||
81 | ### kcm keyboard ### | 81 | ### kcm keyboard ### | ||
82 | include_directories("preview") | | |||
83 | | ||||
84 | find_package(Boost) | | |||
85 | | ||||
86 | if(Boost_FOUND) | | |||
87 | set(NEW_GEOMETRY ON) | | |||
88 | | ||||
89 | set(preview_SRCS | | |||
90 | preview/geometry_components.cpp | | |||
91 | preview/geometry_parser.cpp | | |||
92 | preview/kbpreviewframe.cpp | | |||
93 | preview/keyboardlayout.cpp | | |||
94 | preview/symbol_parser.cpp | | |||
95 | preview/keyaliases.cpp | | |||
96 | preview/keyboardlayout.cpp | | |||
97 | preview/keyboardpainter.cpp | | |||
98 | preview/keysymhelper.cpp | | |||
99 | preview/keysym2ucs.cpp | | |||
100 | ) | | |||
101 | | ||||
102 | set_source_files_properties(preview/geometry_parser.cpp preview/symbol_parser.cpp PROPERTIES COMPILE_FLAGS "-fexceptions") | | |||
103 | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | | |||
104 | # the default maximum template expansion depth (256) is not enough | | |||
105 | set_property(SOURCE preview/geometry_parser.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -ftemplate-depth=512") | | |||
106 | endif() | | |||
107 | else(Boost_FOUND) | | |||
108 | | ||||
109 | message("Boost not found, install Boost libraries to enable keyboard geometry preview") | | |||
110 | | ||||
111 | endif(Boost_FOUND) | | |||
112 | | ||||
113 | 82 | | |||
114 | set(kcm_keyboard_PART_SRCS | 83 | set(kcm_keyboard_PART_SRCS | ||
115 | kcm_keyboard.cpp | 84 | kcm_keyboard.cpp | ||
116 | kcm_keyboard_widget.cpp | 85 | kcm_keyboard_widget.cpp | ||
117 | kcm_view_models.cpp | 86 | kcm_view_models.cpp | ||
118 | kcm_add_layout_dialog.cpp | 87 | kcm_add_layout_dialog.cpp | ||
119 | keyboard_config.cpp | 88 | keyboard_config.cpp | ||
120 | x11_helper.cpp | 89 | x11_helper.cpp | ||
121 | xkb_helper.cpp | 90 | xkb_helper.cpp | ||
122 | xkb_rules.cpp | 91 | xkb_rules.cpp | ||
123 | flags.cpp | 92 | flags.cpp | ||
124 | iso_codes.cpp | 93 | iso_codes.cpp | ||
125 | kcmmisc.cpp | 94 | kcmmisc.cpp | ||
126 | bindings.cpp | 95 | bindings.cpp | ||
127 | ${preview_SRCS} ) | 96 | tastenbrett.cpp) | ||
128 | 97 | | |||
129 | ecm_qt_declare_logging_category(kcm_keyboard_PART_SRCS | 98 | ecm_qt_declare_logging_category(kcm_keyboard_PART_SRCS | ||
130 | HEADER debug.h | 99 | HEADER debug.h | ||
131 | IDENTIFIER KCM_KEYBOARD | 100 | IDENTIFIER KCM_KEYBOARD | ||
132 | CATEGORY_NAME org.kde.kcm_keyboard | 101 | CATEGORY_NAME org.kde.kcm_keyboard | ||
133 | DEFAULT_SEVERITY Warning) | 102 | DEFAULT_SEVERITY Warning) | ||
134 | 103 | | |||
135 | ki18n_wrap_ui(kcm_keyboard_PART_SRCS kcm_keyboard.ui kcm_add_layout_dialog.ui kcmmiscwidget.ui) | 104 | ki18n_wrap_ui(kcm_keyboard_PART_SRCS kcm_keyboard.ui kcm_add_layout_dialog.ui kcmmiscwidget.ui) | ||
Show All 32 Lines | |||||
168 | 137 | | |||
169 | configure_file(config-keyboard.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keyboard.h) | 138 | configure_file(config-keyboard.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keyboard.h) | ||
170 | 139 | | |||
171 | # Unit tests | 140 | # Unit tests | ||
172 | if(BUILD_TESTING) | 141 | if(BUILD_TESTING) | ||
173 | find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED) | 142 | find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED) | ||
174 | add_subdirectory( tests ) | 143 | add_subdirectory( tests ) | ||
175 | endif() | 144 | endif() | ||
145 | | ||||
146 | add_dependencies(kcm_keyboard tastenbrett) |