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                 "${Wayland_DATADIR}/wayland.xml"
0084         )
0085     else()
0086         set(wayland_SRCS)
0087         ecm_add_qtwayland_client_protocol(wayland_SRCS
0088             PROTOCOL recorder/keyboard-shortcuts-inhibit-unstable-v1.xml
0089             BASENAME keyboard-shortcuts-inhibit-unstable-v1
0090         )
0091         ecm_add_qtwayland_client_protocol(wayland_SRCS
0092             PROTOCOL  systemclipboard/wlr-data-control-unstable-v1.xml
0093             BASENAME wlr-data-control-unstable-v1
0094         )
0095         ecm_add_qtwayland_client_protocol(wayland_SRCS
0096             PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/keystate.xml
0097             BASENAME keystate
0098         )
0099         ecm_add_qtwayland_client_protocol(wayland_SRCS
0100             PROTOCOL ${Wayland_DATADIR}/wayland.xml
0101             BASENAME wayland
0102         )
0103         target_sources(KF5GuiAddons PRIVATE
0104             ${wayland_SRCS}
0105         )
0106     endif()
0107     target_sources(KF5GuiAddons PRIVATE
0108         recorder/waylandinhibition.cpp
0109         systemclipboard/waylandclipboard.cpp
0110         util/kmodifierkeyinfoprovider_wayland.cpp
0111         recorder/waylandinhibition_p.h
0112         systemclipboard/waylandclipboard_p.h
0113         util/kmodifierkeyinfoprovider_wayland.h
0114     )
0115     target_compile_definitions(KF5GuiAddons PRIVATE WITH_WAYLAND)
0116     target_link_libraries(KF5GuiAddons PRIVATE Qt${QT_MAJOR_VERSION}::GuiPrivate Qt${QT_MAJOR_VERSION}::WaylandClient Wayland::Client)
0117 endif()
0118 
0119 if(WITH_X11)
0120     target_sources(KF5GuiAddons PRIVATE util/kmodifierkeyinfoprovider_xcb.cpp util/kmodifierkeyinfoprovider_xcb.h)
0121     if (TARGET Qt5::X11Extras)
0122         target_link_libraries(KF5GuiAddons PRIVATE Qt5::X11Extras)
0123     endif()
0124     target_link_libraries(KF5GuiAddons PRIVATE X11::Xkb XCB::XCB)
0125 endif()
0126 
0127 generate_export_header(KF5GuiAddons BASE_NAME KGuiAddons)
0128 
0129 set(kguiaddons_INCLUDES
0130   ${CMAKE_CURRENT_SOURCE_DIR}/colors
0131   ${CMAKE_CURRENT_SOURCE_DIR}/fonts
0132   ${CMAKE_CURRENT_SOURCE_DIR}/text
0133   ${CMAKE_CURRENT_SOURCE_DIR}/util
0134   ${CMAKE_CURRENT_SOURCE_DIR}/recorder
0135   ${CMAKE_CURRENT_SOURCE_DIR}/systemclipboard
0136   )
0137 target_include_directories(KF5GuiAddons PUBLIC "$<BUILD_INTERFACE:${kguiaddons_INCLUDES}>")
0138 target_include_directories(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KGuiAddons>" )
0139 target_compile_definitions(KF5GuiAddons INTERFACE "$<INSTALL_INTERFACE:KGUIADDONS_LIB>")
0140 target_link_libraries(KF5GuiAddons PUBLIC Qt${QT_MAJOR_VERSION}::Gui)
0141 
0142 ecm_generate_headers(KGuiAddons_HEADERS
0143   HEADER_NAMES
0144   KColorUtils
0145   KColorCollection
0146   KColorMimeData
0147   KColorSchemeWatcher
0148 
0149   RELATIVE colors
0150   REQUIRED_HEADERS KGuiAddons_HEADERS
0151 )
0152 ecm_generate_headers(KGuiAddons_HEADERS
0153   HEADER_NAMES
0154   KDateValidator
0155   KWordWrap
0156 
0157   RELATIVE text
0158   REQUIRED_HEADERS KGuiAddons_HEADERS
0159 )
0160 ecm_generate_headers(KGuiAddons_HEADERS
0161   HEADER_NAMES
0162   KFontUtils
0163 
0164   RELATIVE fonts
0165   REQUIRED_HEADERS KGuiAddons_HEADERS
0166 )
0167 ecm_generate_headers(KGuiAddons_HEADERS
0168   HEADER_NAMES
0169   KIconUtils
0170   KImageCache
0171   KModifierKeyInfo
0172   KCursorSaver
0173 
0174   RELATIVE util
0175   REQUIRED_HEADERS KGuiAddons_HEADERS
0176 )
0177 
0178 ecm_generate_headers(KGuiAddons_HEADERS
0179     HEADER_NAMES
0180     KeySequenceRecorder
0181 
0182     RELATIVE recorder
0183     REQUIRED_HEADERS KGuiAddons_HEADERS
0184 )
0185 
0186 #add_subdirectory(systemclipboard)
0187 
0188 ecm_generate_headers(KGuiAddons_HEADERS
0189     HEADER_NAMES
0190     KSystemClipboard
0191 
0192     RELATIVE systemclipboard
0193     REQUIRED_HEADERS KGuiAddons_HEADERS
0194 )
0195 
0196 install(TARGETS KF5GuiAddons EXPORT KF5GuiAddonsTargets ${KF_INSTALL_TARGETS_DEFAULT_ARGS})
0197 install(FILES
0198   ${CMAKE_CURRENT_BINARY_DIR}/kguiaddons_export.h
0199   util/kmodifierkeyinfoprovider_p.h
0200   util/klocalimagecacheimpl.h # implementation detail, no forwarding header
0201   ${KGuiAddons_HEADERS}
0202   DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KGuiAddons COMPONENT Devel
0203 )
0204 
0205 if(BUILD_QCH)
0206     ecm_add_qch(
0207         KF5GuiAddons_QCH
0208         NAME KGuiAddons
0209         BASE_NAME KF5GuiAddons
0210         VERSION ${KF_VERSION}
0211         ORG_DOMAIN org.kde
0212         SOURCES # using only public headers, to cover only public API
0213             ${KGuiAddons_HEADERS}
0214         MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
0215         LINK_QCHS
0216             Qt5Gui_QCH
0217         INCLUDE_DIRS
0218             ${CMAKE_CURRENT_BINARY_DIR}
0219             ${kguiaddons_INCLUDES}
0220         BLANK_MACROS
0221             KGUIADDONS_EXPORT
0222         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0223         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
0224         COMPONENT Devel
0225     )
0226 endif()
0227 
0228 include(ECMGeneratePriFile)
0229 ecm_generate_pri_file(BASE_NAME KGuiAddons LIB_NAME KF5GuiAddons DEPS "gui" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KGuiAddons)
0230 install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
0231 
0232 ecm_qt_install_logging_categories(
0233     EXPORT KGUIADDONS
0234     FILE kguiaddons.categories
0235     DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}"
0236 )
0237 
0238 if(BUILD_TESTING)
0239     add_executable(pasteclient systemclipboard/tests/paste.cpp)
0240 
0241     target_link_libraries(pasteclient
0242         KF5GuiAddons
0243     )
0244 endif()
0245 
0246 if (NOT ANDROID AND BUILD_GEO_SCHEME_HANDLER)
0247     add_subdirectory(geo-scheme-handler)
0248 endif()