Warning, /plasma/layer-shell-qt/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 
0004 remove_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS)
0005 
0006 add_library(LayerShellQtInterface)
0007 if (QT_MAJOR_VERSION EQUAL "5")
0008     ecm_add_qtwayland_client_protocol(LAYER_SHELL_SOURCES PROTOCOL ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml BASENAME xdg-shell)
0009     ecm_add_qtwayland_client_protocol(LAYER_SHELL_SOURCES PROTOCOL wlr-layer-shell-unstable-v1.xml BASENAME wlr-layer-shell-unstable-v1)
0010 else()
0011     qt6_generate_wayland_protocol_client_sources(LayerShellQtInterface FILES
0012         ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml
0013         ${CMAKE_CURRENT_SOURCE_DIR}/wlr-layer-shell-unstable-v1.xml
0014     )
0015 endif()
0016 
0017 ecm_qt_declare_logging_category(LAYER_SHELL_SOURCES
0018     HEADER
0019         layershellqt_logging.h
0020     IDENTIFIER
0021         LAYERSHELLQT
0022     CATEGORY_NAME
0023         layershellqt
0024 )
0025 
0026 target_sources(LayerShellQtInterface PRIVATE qwaylandlayersurface.cpp interfaces/window.cpp interfaces/shell.cpp qwaylandlayershellintegration.cpp qwaylandlayershell.cpp ${LAYER_SHELL_SOURCES})
0027 target_link_libraries(LayerShellQtInterface PRIVATE Qt::Gui Qt::WaylandClientPrivate Wayland::Client PkgConfig::XKBCOMMON)
0028 if (TARGET Qt::XkbCommonSupportPrivate)
0029     target_link_libraries(LayerShellQtInterface PRIVATE Qt::XkbCommonSupportPrivate)
0030 endif()
0031 target_include_directories(LayerShellQtInterface PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/LayerShellQt>"
0032                                               INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/>"
0033 )
0034 
0035 set_target_properties(LayerShellQtInterface PROPERTIES VERSION   ${LAYERSHELLQT_VERSION}
0036                                                        SOVERSION ${LAYERSHELLQT_SOVERSION}
0037                                                        EXPORT_NAME Interface
0038 )
0039 
0040 add_library(layer-shell SHARED qwaylandlayershellintegrationplugin.cpp)
0041 target_link_libraries(layer-shell LayerShellQtInterface Qt::WaylandClient Qt::WaylandClientPrivate Wayland::Client PkgConfig::XKBCOMMON)
0042 if (TARGET Qt::XkbCommonSupportPrivate)
0043     target_link_libraries(layer-shell Qt::XkbCommonSupportPrivate)
0044 endif()
0045 
0046 ecm_generate_headers(LayerShellQt_HEADERS
0047     HEADER_NAMES
0048         Shell
0049         Window
0050     RELATIVE interfaces/
0051     REQUIRED_HEADERS LayerShellQt_HEADERS
0052 )
0053 
0054 
0055 generate_export_header(LayerShellQtInterface
0056     BASE_NAME LayerShellQtInterface
0057     EXPORT_MACRO_NAME LAYERSHELLQT_EXPORT
0058     EXPORT_FILE_NAME LayerShellQt/layershellqt_export.h
0059 )
0060 
0061 install(TARGETS layer-shell
0062         LIBRARY DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/wayland-shell-integration)
0063 
0064 install(TARGETS LayerShellQtInterface EXPORT LayerShellQtTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0065 
0066 install(FILES
0067     ${LayerShellQt_HEADERS}
0068     ${CMAKE_CURRENT_BINARY_DIR}/LayerShellQt/layershellqt_export.h
0069     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/LayerShellQt COMPONENT Devel
0070 )