Warning, /frameworks/kguiaddons/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
0002 
0003 add_library(KF5GuiAddons)
0004 add_library(KF5::GuiAddons ALIAS KF5GuiAddons)
0005 
0006 set_target_properties(KF5GuiAddons PROPERTIES
0007     VERSION     ${KGUIADDONS_VERSION}
0008     SOVERSION   ${KGUIADDONS_SOVERSION}
0009     EXPORT_NAME GuiAddons
0010 )
0011 
0012 target_sources(KF5GuiAddons PRIVATE
0013  colors/kcolorspaces.cpp
0014  colors/kcolorutils.cpp
0015  colors/kcolorcollection.cpp
0016  colors/kcolormimedata.cpp
0017  colors/kcolorschemewatcher.cpp
0018  colors/kcolorschemewatcherbackend.cpp
0019  text/kdatevalidator.cpp
0020  text/kwordwrap.cpp
0021  fonts/kfontutils.cpp
0022  util/kiconutils.cpp
0023  util/klocalimagecacheimpl.cpp
0024  util/kmodifierkeyinfo.cpp
0025  util/kmodifierkeyinfoprovider.cpp
0026  util/kurlhandler_p.cpp
0027  util/kcursorsaver.cpp
0028  recorder/keyboardgrabber.cpp
0029  recorder/keysequencerecorder.cpp
0030  systemclipboard/qtclipboard.cpp
0031  systemclipboard/ksystemclipboard.cpp
0032 
0033  colors/kcolorspaces_p.h
0034  colors/kcolorutils.h
0035  colors/kcolorcollection.h
0036  colors/kcolormimedata.h
0037  text/kdatevalidator.h
0038  text/kwordwrap.h
0039  fonts/kfontutils.h
0040  util/kiconutils.h
0041  util/klocalimagecacheimpl.h
0042  util/kmodifierkeyinfo.h
0043  util/kmodifierkeyinfoprovider_p.h
0044  util/kurlhandler_p.h
0045  util/kcursorsaver.h
0046  recorder/keyboardgrabber_p.h
0047  recorder/keysequencerecorder.h
0048  systemclipboard/qtclipboard_p.h
0049  systemclipboard/ksystemclipboard.h
0050 )
0051 
0052 ecm_qt_declare_logging_category(KF5GuiAddons
0053     HEADER kguiaddons_debug.h
0054     IDENTIFIER KGUIADDONS_LOG
0055     CATEGORY_NAME kf.guiaddons
0056     DESCRIPTION "KGuiAddons"
0057     EXPORT KGUIADDONS
0058 )
0059 
0060 if(WIN32)
0061     target_sources(KF5GuiAddons PRIVATE colors/kcolorschemewatcher_win.cpp)
0062     target_link_libraries(KF5GuiAddons PRIVATE advapi32)
0063 endif()
0064 
0065 if(APPLE)
0066     find_library(APPKIT_LIBRARY AppKit)
0067     target_sources(KF5GuiAddons PRIVATE colors/kcolorschemewatcher_mac.mm)
0068     target_link_libraries(KF5GuiAddons PRIVATE ${APPKIT_LIBRARY})
0069 endif()
0070 
0071 if(WITH_DBUS)
0072     target_sources(KF5GuiAddons PRIVATE colors/kcolorschemewatcher_xdg.cpp)
0073     target_link_libraries(KF5GuiAddons PRIVATE Qt${QT_MAJOR_VERSION}::DBus)
0074 endif()
0075 
0076 if(WITH_WAYLAND)
0077     if (TARGET Qt6::WaylandClient)
0078         qt_generate_wayland_protocol_client_sources(KF5GuiAddons
0079             FILES
0080                 "${CMAKE_CURRENT_SOURCE_DIR}/recorder/keyboard-shortcuts-inhibit-unstable-v1.xml"
0081                 "${CMAKE_CURRENT_SOURCE_DIR}/systemclipboard/wlr-data-control-unstable-v1.xml"
0082                 "${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml"
0083         )
0084     else()
0085         set(wayland_SRCS)
0086         ecm_add_qtwayland_client_protocol(wayland_SRCS
0087             PROTOCOL recorder/keyboard-shortcuts-inhibit-unstable-v1.xml
0088             BASENAME keyboard-shortcuts-inhibit-unstable-v1
0089         )
0090         ecm_add_qtwayland_client_protocol(wayland_SRCS
0091             PROTOCOL  systemclipboard/wlr-data-control-unstable-v1.xml
0092             BASENAME wlr-data-control-unstable-v1
0093         )
0094         ecm_add_qtwayland_client_protocol(wayland_SRCS
0095             PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml
0096             BASENAME keystate
0097         )
0098         target_sources(KF5GuiAddons PRIVATE
0099             ${wayland_SRCS}
0100         )
0101     endif()
0102     target_sources(KF5GuiAddons PRIVATE
0103         recorder/waylandinhibition.cpp
0104         systemclipboard/waylandclipboard.cpp
0105         util/kmodifierkeyinfoprovider_wayland.cpp
0106         recorder/waylandinhibition_p.h
0107         systemclipboard/waylandclipboard_p.h
0108         util/kmodifierkeyinfoprovider_wayland.h
0109     )
0110     target_compile_definitions(KF5GuiAddons PRIVATE WITH_WAYLAND)
0111     target_link_libraries(KF5GuiAddons PRIVATE Qt${QT_MAJOR_VERSION}::GuiPrivate Qt${QT_MAJOR_VERSION}::WaylandClient Wayland::Client)
0112 endif()
0113 
0114 if(WITH_X11)
0115     target_sources(KF5GuiAddons PRIVATE util/kmodifierkeyinfoprovider_xcb.cpp util/kmodifierkeyinfoprovider_xcb.h)
0116     if (TARGET Qt5::X11Extras)
0117         target_link_libraries(KF5GuiAddons PRIVATE Qt5::X11Extras)
0118     endif()
0119     target_link_libraries(KF5GuiAddons PRIVATE X11::Xkb XCB::XCB)
0120 endif()
0121 
0122 generate_export_header(KF5GuiAddons BASE_NAME KGuiAddons)
0123 
0124 set(kguiaddons_INCLUDES
0125   ${CMAKE_CURRENT_SOURCE_DIR}/colors
0126   ${CMAKE_CURRENT_SOURCE_DIR}/fonts
0127   ${CMAKE_CURRENT_SOURCE_DIR}/text
0128   ${CMAKE_CURRENT_SOURCE_DIR}/util
0129   ${CMAKE_CURRENT_SOURCE_DIR}/recorder
0130   ${CMAKE_CURRENT_SOURCE_DIR}/systemclipboard
0131   )
0132 target_include_directories(KF5GuiAddons PUBLIC "$<BUILD_INTERFACE:${kguiaddons_INCLUDES}>")
0133 target_include_directories(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KGuiAddons>" )
0134 target_compile_definitions(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:KGUIADDONS_LIB>")
0135 target_link_libraries(KF5GuiAddons PUBLIC Qt${QT_MAJOR_VERSION}::Gui)
0136 
0137 ecm_generate_headers(KGuiAddons_HEADERS
0138   HEADER_NAMES
0139   KColorUtils
0140   KColorCollection
0141   KColorMimeData
0142   KColorSchemeWatcher
0143 
0144   RELATIVE colors
0145   REQUIRED_HEADERS KGuiAddons_HEADERS
0146 )
0147 ecm_generate_headers(KGuiAddons_HEADERS
0148   HEADER_NAMES
0149   KDateValidator
0150   KWordWrap
0151 
0152   RELATIVE text
0153   REQUIRED_HEADERS KGuiAddons_HEADERS
0154 )
0155 ecm_generate_headers(KGuiAddons_HEADERS
0156   HEADER_NAMES
0157   KFontUtils
0158 
0159   RELATIVE fonts
0160   REQUIRED_HEADERS KGuiAddons_HEADERS
0161 )
0162 ecm_generate_headers(KGuiAddons_HEADERS
0163   HEADER_NAMES
0164   KIconUtils
0165   KImageCache
0166   KModifierKeyInfo
0167   KCursorSaver
0168 
0169   RELATIVE util
0170   REQUIRED_HEADERS KGuiAddons_HEADERS
0171 )
0172 
0173 ecm_generate_headers(KGuiAddons_HEADERS
0174     HEADER_NAMES
0175     KeySequenceRecorder
0176 
0177     RELATIVE recorder
0178     REQUIRED_HEADERS KGuiAddons_HEADERS
0179 )
0180 
0181 #add_subdirectory(systemclipboard)
0182 
0183 ecm_generate_headers(KGuiAddons_HEADERS
0184     HEADER_NAMES
0185     KSystemClipboard
0186 
0187     RELATIVE systemclipboard
0188     REQUIRED_HEADERS KGuiAddons_HEADERS
0189 )
0190 
0191 install(TARGETS KF5GuiAddons EXPORT KF5GuiAddonsTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
0192 install(FILES
0193   ${CMAKE_CURRENT_BINARY_DIR}/kguiaddons_export.h
0194   util/kmodifierkeyinfoprovider_p.h
0195   util/klocalimagecacheimpl.h # implementation detail, no forwarding header
0196   ${KGuiAddons_HEADERS}
0197   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KGuiAddons COMPONENT Devel
0198 )
0199 
0200 if(BUILD_QCH)
0201     ecm_add_qch(
0202         KF5GuiAddons_QCH
0203         NAME KGuiAddons
0204         BASE_NAME KF5GuiAddons
0205         VERSION ${KF_VERSION}
0206         ORG_DOMAIN org.kde
0207         SOURCES # using only public headers, to cover only public API
0208             ${KGuiAddons_HEADERS}
0209         MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
0210         LINK_QCHS
0211             Qt5Gui_QCH
0212         INCLUDE_DIRS
0213             ${CMAKE_CURRENT_BINARY_DIR}
0214             ${kguiaddons_INCLUDES}
0215         BLANK_MACROS
0216             KGUIADDONS_EXPORT
0217         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0218         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0219         COMPONENT Devel
0220     )
0221 endif()
0222 
0223 include(ECMGeneratePriFile)
0224 ecm_generate_pri_file(BASE_NAME KGuiAddons LIB_NAME KF5GuiAddons DEPS "gui" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KGuiAddons)
0225 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
0226 
0227 ecm_qt_install_logging_categories(
0228     EXPORT KGUIADDONS
0229     FILE kguiaddons.categories
0230     DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
0231 )
0232 
0233 if(BUILD_TESTING)
0234     add_executable(pasteclient systemclipboard/tests/paste.cpp)
0235 
0236     target_link_libraries(pasteclient
0237         KF5GuiAddons
0238     )
0239 endif()
0240 
0241 if (NOT ANDROID)
0242     add_subdirectory(geo-scheme-handler)
0243 endif()