Warning, /plasma/plasma-desktop/kcms/keyboard/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 add_definitions(-DTRANSLATION_DOMAIN=\"kcmkeyboard\")
0002 
0003 add_subdirectory(tastenbrett)
0004 
0005 option(HAVE_XINPUT "X11 XInput" OFF)
0006 option(HAVE_UDEV "UDev" OFF)
0007 
0008 if (X11_Xinput_FOUND)
0009     set(HAVE_XINPUT ON)
0010 elseif (UDEV_FOUND)
0011     set(HAVE_UDEV ON)
0012 else()
0013     message(STATUS "X11 XInput and UDev is not found, either is required to keep layouts with keyboard hotplugging")
0014 endif()
0015 
0016 ### kded daemon ###
0017 
0018 set( kded_keyboard_SRCS
0019     ${CMAKE_CURRENT_BINARY_DIR}/debug.cpp
0020     keyboard_daemon.cpp
0021     layout_memory.cpp
0022     layout_memory_persister.cpp
0023     udev_helper.cpp
0024     x11_helper.cpp
0025     xinput_helper.cpp
0026     xkb_helper.cpp
0027     keyboard_config.cpp
0028     keyboard_hardware.cpp
0029     bindings.cpp
0030     flags.cpp
0031     xkb_rules.cpp
0032     layoutnames.cpp
0033 )
0034 
0035 kconfig_add_kcfg_files(kded_keyboard_SRCS keyboardsettings.kcfgc)
0036 
0037 include_directories(${CMAKE_CURRENT_BINARY_DIR})
0038 
0039 kcoreaddons_add_plugin(kded_keyboard SOURCES ${kded_keyboard_SRCS} INSTALL_NAMESPACE kf${QT_MAJOR_VERSION}/kded)
0040 set_target_properties(kded_keyboard PROPERTIES OUTPUT_NAME keyboard)
0041 
0042 target_link_libraries(kded_keyboard
0043     Qt::Concurrent
0044     Qt::Widgets
0045     Qt::Xml
0046     KF5::ConfigCore
0047     KF5::CoreAddons
0048     KF5::KCMUtils
0049     KF5::DBusAddons
0050     KF5::GlobalAccel
0051     KF5::I18n
0052     KF5::Notifications
0053     KF5::WindowSystem
0054     KF5::Plasma
0055     KF5::XmlGui
0056     KF5::GuiAddons
0057     XCB::XCB
0058     XCB::XKB
0059     X11::X11
0060     X11::xkbfile
0061  )
0062 if (QT_MAJOR_VERSION EQUAL "5")
0063     target_link_libraries(kded_keyboard Qt5::X11Extras)
0064 else()
0065     target_link_libraries(kded_keyboard Qt::GuiPrivate)
0066 endif()
0067 
0068 if (HAVE_XINPUT)
0069     target_link_libraries(kded_keyboard X11::Xi)
0070 endif()
0071 
0072 if (HAVE_UDEV)
0073     target_link_libraries(kded_keyboard UDev::UDev)
0074 endif()
0075 
0076 ### kcm keyboard ###
0077 
0078 set(kcm_keyboard_PART_SRCS
0079   kcm_keyboard.cpp
0080   kcm_keyboard_widget.cpp
0081   kcm_view_models.cpp
0082   kcm_add_layout_dialog.cpp
0083   keyboard_config.cpp
0084   keyboardsettingsdata.cpp
0085   x11_helper.cpp
0086   xkb_helper.cpp
0087   xkb_rules.cpp
0088   flags.cpp
0089   iso_codes.cpp
0090   kcmmisc.cpp
0091   bindings.cpp
0092   tastenbrett.cpp)
0093 
0094 install(FILES kcminputrc_repeat.upd
0095         DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
0096 install(PROGRAMS kcminputrc_migrate_repeat_value.py
0097         DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
0098 install(FILES kcminputrc_fix_botched_5_21_0.upd
0099         DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
0100 install(PROGRAMS kcminputrc_fix_botched_5_21_0.py
0101         DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
0102 
0103 ecm_qt_declare_logging_category(kcm_keyboard_PART_SRCS
0104     HEADER debug.h
0105     IDENTIFIER KCM_KEYBOARD
0106     CATEGORY_NAME org.kde.kcm_keyboard
0107     DEFAULT_SEVERITY Warning
0108     DESCRIPTION "KCM and KDED for keyboard layouts"
0109     EXPORT kcm_keyboard)
0110 ecm_qt_install_logging_categories(
0111     EXPORT kcm_keyboard
0112     DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
0113 )
0114 
0115 kconfig_add_kcfg_files(kcm_keyboard_PART_SRCS workspace_options.kcfgc keyboardsettings.kcfgc keyboardmiscsettings.kcfgc)
0116 
0117 ki18n_wrap_ui(kcm_keyboard_PART_SRCS kcm_keyboard.ui kcm_add_layout_dialog.ui kcmmiscwidget.ui)
0118 
0119 add_library(kcm_keyboard_static STATIC ${kcm_keyboard_PART_SRCS})
0120 
0121 set_property(TARGET kcm_keyboard_static PROPERTY POSITION_INDEPENDENT_CODE ON)
0122 
0123 target_link_libraries(kcm_keyboard_static
0124     Qt::Concurrent
0125     Qt::Widgets
0126     Qt::Xml
0127     KF5::KCMUtils
0128     KF5::GlobalAccel
0129     KF5::I18n
0130     KF5::WindowSystem
0131     KF5::Plasma
0132     KF5::XmlGui
0133     KF5::GuiAddons
0134     XCB::XCB
0135     XCB::XKB
0136     X11::X11
0137     X11::xkbfile
0138 )
0139 if (QT_MAJOR_VERSION EQUAL "5")
0140     target_link_libraries(kcm_keyboard_static Qt5::X11Extras)
0141 else()
0142     target_link_libraries(kcm_keyboard_static Qt::GuiPrivate)
0143 endif()
0144 
0145 kcoreaddons_add_plugin(kcm_keyboard SOURCES kcmmain.cpp INSTALL_NAMESPACE "plasma/kcms/systemsettings")
0146 kcmutils_generate_desktop_file(kcm_keyboard)
0147 
0148 target_link_libraries(kcm_keyboard kcm_keyboard_static)
0149 
0150 add_subdirectory(kconf_update)
0151 
0152 configure_file(config-keyboard.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keyboard.h)
0153 
0154 # Unit tests
0155 if(BUILD_TESTING)
0156     find_package(Qt${QT_MAJOR_VERSION}Test ${QT_MIN_VERSION} CONFIG REQUIRED)
0157     add_subdirectory( tests )
0158 endif()
0159 
0160 add_dependencies(kcm_keyboard tastenbrett)