diff options
Diffstat (limited to 'examples/wayland/texture-sharing')
3 files changed, 102 insertions, 0 deletions
diff --git a/examples/wayland/texture-sharing/CMakeLists.txt b/examples/wayland/texture-sharing/CMakeLists.txt new file mode 100644 index 000000000..bf6a7cbf9 --- /dev/null +++ b/examples/wayland/texture-sharing/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from texture-sharing.pro. + +add_subdirectory(qml-client) +add_subdirectory(custom-compositor) diff --git a/examples/wayland/texture-sharing/custom-compositor/CMakeLists.txt b/examples/wayland/texture-sharing/custom-compositor/CMakeLists.txt new file mode 100644 index 000000000..ea56f9c3f --- /dev/null +++ b/examples/wayland/texture-sharing/custom-compositor/CMakeLists.txt @@ -0,0 +1,54 @@ +# Generated from custom-compositor.pro. + +cmake_minimum_required(VERSION 3.14) +project(texture-sharing-custom-compositor LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples/wayland/texture-sharing/custom-compositor") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 COMPONENTS WaylandCompositor) + +add_qt_gui_executable(texture-sharing-custom-compositor + main.cpp +) +target_link_libraries(texture-sharing-custom-compositor PRIVATE + Qt::WaylandCompositorPrivate +) + +target_link_libraries(texture-sharing-custom-compositor PUBLIC + Qt::Core + Qt::Gui + Qt::Qml + Qt::WaylandCompositor +) + + +# Resources: +set(compositor_resource_files + "images/background.png" + "images/car.ktx" + "images/qt4.astc" + "images/qt_logo.png" + "qml/main.qml" +) + +qt6_add_resources(texture-sharing-custom-compositor "compositor" + PREFIX + "/" + FILES + ${compositor_resource_files} +) + +install(TARGETS texture-sharing-custom-compositor + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/wayland/texture-sharing/qml-client/CMakeLists.txt b/examples/wayland/texture-sharing/qml-client/CMakeLists.txt new file mode 100644 index 000000000..ec2e02ee4 --- /dev/null +++ b/examples/wayland/texture-sharing/qml-client/CMakeLists.txt @@ -0,0 +1,44 @@ +# Generated from qml-client.pro. + +cmake_minimum_required(VERSION 3.14) +project(qml-client LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples/wayland/texture-sharing/qml-client") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Quick) + +add_qt_gui_executable(qml-client + main.cpp +) +target_link_libraries(qml-client PUBLIC + Qt::Core + Qt::Gui + Qt::Quick +) + + +# Resources: +set(qml-client_resource_files + "main.qml" +) + +qt6_add_resources(qml-client "qml-client" + PREFIX + "/" + FILES + ${qml-client_resource_files} +) + +install(TARGETS qml-client + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |