# Generated from compositor.pro.

#####################################################################
## WaylandCompositor Module:
#####################################################################

# special case begin
set(__qt_wayland_compositor_module_args "")
if(QT_FEATURE_wayland_compositor_quick)
    list(APPEND __qt_wayland_compositor_module_args "GENERATE_METATYPES")
endif()
# special case end

qt_internal_add_module(WaylandCompositor
    ${__qt_wayland_compositor_module_args} # special case
    PLUGIN_TYPES wayland-graphics-integration-server wayland-hardware-layer-integration
    SOURCES
        ../shared/qwaylandinputmethodeventbuilder.cpp ../shared/qwaylandinputmethodeventbuilder_p.h
        ../shared/qwaylandmimehelper.cpp ../shared/qwaylandmimehelper_p.h
        ../shared/qwaylandsharedmemoryformathelper_p.h
        compositor_api/qwaylandbufferref.cpp compositor_api/qwaylandbufferref.h
        compositor_api/qwaylandclient.cpp compositor_api/qwaylandclient.h
        compositor_api/qwaylandcompositor.cpp compositor_api/qwaylandcompositor.h compositor_api/qwaylandcompositor_p.h
        compositor_api/qwaylanddestroylistener.cpp compositor_api/qwaylanddestroylistener.h compositor_api/qwaylanddestroylistener_p.h
        compositor_api/qwaylandkeyboard.cpp compositor_api/qwaylandkeyboard.h compositor_api/qwaylandkeyboard_p.h
        compositor_api/qwaylandkeymap.cpp compositor_api/qwaylandkeymap.h compositor_api/qwaylandkeymap_p.h
        compositor_api/qwaylandoutput.cpp compositor_api/qwaylandoutput.h compositor_api/qwaylandoutput_p.h
        compositor_api/qwaylandoutputmode.cpp compositor_api/qwaylandoutputmode.h compositor_api/qwaylandoutputmode_p.h
        compositor_api/qwaylandpointer.cpp compositor_api/qwaylandpointer.h compositor_api/qwaylandpointer_p.h
        compositor_api/qwaylandresource.cpp compositor_api/qwaylandresource.h
        compositor_api/qwaylandseat.cpp compositor_api/qwaylandseat.h compositor_api/qwaylandseat_p.h
        compositor_api/qwaylandsurface.cpp compositor_api/qwaylandsurface.h compositor_api/qwaylandsurface_p.h
        compositor_api/qwaylandsurfacegrabber.cpp compositor_api/qwaylandsurfacegrabber.h
        compositor_api/qwaylandtouch.cpp compositor_api/qwaylandtouch.h compositor_api/qwaylandtouch_p.h
        compositor_api/qwaylandview.cpp compositor_api/qwaylandview.h compositor_api/qwaylandview_p.h
        extensions/qwaylandidleinhibitv1.cpp extensions/qwaylandidleinhibitv1.h extensions/qwaylandidleinhibitv1_p.h
        extensions/qwaylandiviapplication.cpp extensions/qwaylandiviapplication.h extensions/qwaylandiviapplication_p.h
        extensions/qwaylandivisurface.cpp extensions/qwaylandivisurface.h extensions/qwaylandivisurface_p.h
        extensions/qwaylandqttextinputmethod.cpp extensions/qwaylandqttextinputmethod.h extensions/qwaylandqttextinputmethod_p.h
        extensions/qwaylandqttextinputmethodmanager.cpp extensions/qwaylandqttextinputmethodmanager.h extensions/qwaylandqttextinputmethodmanager_p.h
        extensions/qwaylandqtwindowmanager.cpp extensions/qwaylandqtwindowmanager.h extensions/qwaylandqtwindowmanager_p.h
        extensions/qwaylandshell.cpp extensions/qwaylandshell.h extensions/qwaylandshell_p.h
        extensions/qwaylandshellsurface.cpp extensions/qwaylandshellsurface.h
        extensions/qwaylandtextinput.cpp extensions/qwaylandtextinput.h extensions/qwaylandtextinput_p.h
        extensions/qwaylandtextinputmanager.cpp extensions/qwaylandtextinputmanager.h extensions/qwaylandtextinputmanager_p.h
        extensions/qwaylandviewporter.cpp extensions/qwaylandviewporter.h extensions/qwaylandviewporter_p.h
        extensions/qwaylandwlshell.cpp extensions/qwaylandwlshell.h extensions/qwaylandwlshell_p.h
        extensions/qwaylandxdgdecorationv1.cpp extensions/qwaylandxdgdecorationv1.h extensions/qwaylandxdgdecorationv1_p.h
        extensions/qwaylandxdgoutputv1.cpp extensions/qwaylandxdgoutputv1.h extensions/qwaylandxdgoutputv1_p.h
        extensions/qwaylandxdgshell.cpp extensions/qwaylandxdgshell.h extensions/qwaylandxdgshell_p.h
        extensions/qwlqtkey.cpp extensions/qwlqtkey_p.h
        extensions/qwlqttouch.cpp extensions/qwlqttouch_p.h
        global/qtwaylandcompositorglobal.h
        global/qtwaylandqmlinclude.h
        global/qwaylandcompositorextension.cpp global/qwaylandcompositorextension.h global/qwaylandcompositorextension_p.h
        global/qwaylandquickextension.h
        global/qwaylandutils_p.h
        hardware_integration/qwlclientbufferintegration.cpp hardware_integration/qwlclientbufferintegration_p.h
        wayland_wrapper/qwlbuffermanager.cpp wayland_wrapper/qwlbuffermanager_p.h
        wayland_wrapper/qwlclientbuffer.cpp wayland_wrapper/qwlclientbuffer_p.h
        wayland_wrapper/qwlregion.cpp wayland_wrapper/qwlregion_p.h
    INCLUDE_DIRECTORIES
        ../shared
        compositor_api
        extensions
        global
        wayland_wrapper
    LIBRARIES
        Qt::CorePrivate
        Qt::GuiPrivate
    PUBLIC_LIBRARIES
        Qt::Core
        Qt::Gui
        Wayland::Server
    PRIVATE_MODULE_INTERFACE
        Qt::CorePrivate
        Qt::GuiPrivate
)

# Resources:
set(compositor_resource_files
    "shaders/surface.vert.qsb"
    "shaders/surface_rgba.frag.qsb"
    "shaders/surface_rgbx.frag.qsb"
    "shaders/surface_y_u_v.frag.qsb"
    "shaders/surface_y_uv.frag.qsb"
    "shaders/surface_y_xuxv.frag.qsb"
)

qt_internal_add_resource(WaylandCompositor "compositor"
    PREFIX
        "/qt-project.org/wayland/compositor"
    FILES
        ${compositor_resource_files}
)


qt6_generate_wayland_protocol_server_sources(WaylandCompositor
    FILES
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/idle-inhibit-unstable-v1.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/ivi-application.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/scaler.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/text-input-unstable-v2.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/viewporter.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/wayland.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/xdg-decoration-unstable-v1.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/xdg-output-unstable-v1.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty/protocol/xdg-shell.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/hardware-integration.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/qt-key-unstable-v1.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/qt-text-input-method-unstable-v1.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/qt-texture-sharing-unstable-v1.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/qt-windowmanager.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/server-buffer-extension.xml
        ${CMAKE_CURRENT_SOURCE_DIR}/../extensions/touch-extension.xml
)

#### Keys ignored in scope 1:.:.:compositor.pro:<TRUE>:
# MODULE = "waylandcompositor"

## Scopes:
#####################################################################

qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_opengl
    SOURCES
        hardware_integration/qwlclientbufferintegrationfactory.cpp hardware_integration/qwlclientbufferintegrationfactory_p.h
        hardware_integration/qwlclientbufferintegrationplugin.cpp hardware_integration/qwlclientbufferintegrationplugin_p.h
        hardware_integration/qwlhardwarelayerintegration.cpp hardware_integration/qwlhardwarelayerintegration_p.h
        hardware_integration/qwlhardwarelayerintegrationfactory.cpp hardware_integration/qwlhardwarelayerintegrationfactory_p.h
        hardware_integration/qwlhardwarelayerintegrationplugin.cpp hardware_integration/qwlhardwarelayerintegrationplugin_p.h
        hardware_integration/qwlhwintegration.cpp hardware_integration/qwlhwintegration_p.h
        hardware_integration/qwlserverbufferintegration.cpp hardware_integration/qwlserverbufferintegration_p.h
        hardware_integration/qwlserverbufferintegrationfactory.cpp hardware_integration/qwlserverbufferintegrationfactory_p.h
        hardware_integration/qwlserverbufferintegrationplugin.cpp hardware_integration/qwlserverbufferintegrationplugin_p.h
    PUBLIC_LIBRARIES
        Qt::OpenGL
)

qt_internal_extend_target(WaylandCompositor CONDITION TARGET Qt::Quick
    PUBLIC_LIBRARIES
        Qt::Quick
)

qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_wayland_compositor_quick
    SOURCES
        compositor_api/qwaylandcompositorquickextensions_p.h
        compositor_api/qwaylandmousetracker.cpp compositor_api/qwaylandmousetracker_p.h
        compositor_api/qwaylandquickchildren.h
        compositor_api/qwaylandquickcompositor.cpp compositor_api/qwaylandquickcompositor.h
        compositor_api/qwaylandquickitem.cpp compositor_api/qwaylandquickitem.h compositor_api/qwaylandquickitem_p.h
        compositor_api/qwaylandquickoutput.cpp compositor_api/qwaylandquickoutput.h
        compositor_api/qwaylandquicksurface.cpp compositor_api/qwaylandquicksurface.h
        extensions/qwaylandivisurfaceintegration.cpp extensions/qwaylandivisurfaceintegration_p.h
        extensions/qwaylandquickshellintegration.cpp extensions/qwaylandquickshellintegration.h
        extensions/qwaylandquickshellsurfaceitem.cpp extensions/qwaylandquickshellsurfaceitem.h extensions/qwaylandquickshellsurfaceitem_p.h
        extensions/qwaylandquickxdgoutputv1.cpp extensions/qwaylandquickxdgoutputv1.h
        extensions/qwaylandwlshellintegration.cpp extensions/qwaylandwlshellintegration_p.h
        extensions/qwaylandxdgshellintegration.cpp extensions/qwaylandxdgshellintegration_p.h
    LIBRARIES
        Qt::QmlPrivate
        Qt::QuickPrivate
    PUBLIC_LIBRARIES
        Qt::Qml
        Qt::Quick
    PRIVATE_MODULE_INTERFACE
        Qt::QmlPrivate
        Qt::QuickPrivate
)

#### Keys ignored in scope 4:.:.:compositor.pro:QT_FEATURE_wayland_compositor_quick:
# QMLTYPES_FILENAME = "plugins.qmltypes"
# QMLTYPES_INSTALL_DIR = "$$[QT_INSTALL_QML]/QtWayland/Compositor"
# QML_IMPORT_NAME = "QtWayland.Compositor"
# QML_IMPORT_VERSION = "$$QT_VERSION"

qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_wayland_datadevice
    SOURCES
        wayland_wrapper/qwldatadevice.cpp wayland_wrapper/qwldatadevice_p.h
        wayland_wrapper/qwldatadevicemanager.cpp wayland_wrapper/qwldatadevicemanager_p.h
        wayland_wrapper/qwldataoffer.cpp wayland_wrapper/qwldataoffer_p.h
        wayland_wrapper/qwldatasource.cpp wayland_wrapper/qwldatasource_p.h
)

# special case begin
#
# Do not explicitly add XKB::XKB. This is already done by Qt::GuiPrivate.
#
#qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_xkbcommon
#    PUBLIC_LIBRARIES
#        XKB::XKB
#)
# special case end

qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_im
    SOURCES
        compositor_api/qwaylandinputmethodcontrol.cpp compositor_api/qwaylandinputmethodcontrol.h compositor_api/qwaylandinputmethodcontrol_p.h
)

qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_draganddrop
    SOURCES
        compositor_api/qwaylanddrag.cpp compositor_api/qwaylanddrag.h
)

qt_internal_extend_target(WaylandCompositor CONDITION QT_FEATURE_opengl AND QT_FEATURE_wayland_compositor_quick
    SOURCES
        compositor_api/qwaylandquickhardwarelayer.cpp compositor_api/qwaylandquickhardwarelayer_p.h
        extensions/qwltexturesharingextension.cpp extensions/qwltexturesharingextension_p.h
)
qt_internal_add_docs(WaylandCompositor
    doc/qtwaylandcompositor.qdocconf
)

# special case begin
if (TARGET Qt::Qml)
    set_target_properties(WaylandCompositor PROPERTIES
        QT_QML_MODULE_INSTALL_QMLTYPES TRUE
        QT_QML_MODULE_VERSION ${CMAKE_PROJECT_VERSION}
        QT_QML_MODULE_URI QtWayland.Compositor
        QT_QMLTYPES_FILENAME plugins.qmltypes
        QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtWayland/Compositor"
    )

    qt6_qml_type_registration(WaylandCompositor)
endif()

qt_record_extra_qt_main_tools_package_dependency(WaylandCompositor WaylandScannerTools "${PROJECT_VERSION}")
# special case end

