CMake: Regenerate qt3d examples

Many of the examples were missing find_package() calls.
Some were missing some example install dir things.
Some missing special cases.
Some incorrectly specified library names due to missing mappings in
pro2cmake.
Some incorrectly specified target names.

Change-Id: I131a02dc679502ea6c1cdeb32962e77f09e672af
Reviewed-by: Mike Krus <mike.krus@kdab.com>
This commit is contained in:
Alexandru Croitor 2020-10-16 16:10:16 +02:00
parent 26ec84b4b1
commit c4be23758f
30 changed files with 504 additions and 8 deletions

View File

@ -17,6 +17,10 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DExtras)
add_qt_gui_executable(3d-text
main.cpp

View File

@ -0,0 +1,91 @@
# Generated from advancedcustommaterial.pro.
cmake_minimum_required(VERSION 3.14)
project(advancedcustommaterial LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
add_qt_gui_executable(advancedcustommaterial
main.cpp
)
target_link_libraries(advancedcustommaterial PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(qml_resource_files
"SceneRoot.qml"
"Water.qml"
"WaterMaterial.qml"
"main.qml"
)
qt6_add_resources(advancedcustommaterial "qml"
PREFIX
"/"
FILES
${qml_resource_files}
)
set(models_resource_files
"models/waterPlane.obj"
)
qt6_add_resources(advancedcustommaterial "models"
PREFIX
"/"
FILES
${models_resource_files}
)
set(textures_resource_files
"textures/WaterDiffuse.jpg"
"textures/WaterNormal.jpg"
"textures/WaterSpecular.jpg"
"textures/Waterwave.jpg"
"textures/foam.jpg"
"textures/sky.jpg"
)
qt6_add_resources(advancedcustommaterial "textures"
PREFIX
"/"
FILES
${textures_resource_files}
)
set(shaders_resource_files
"shaders/es2/water.frag"
"shaders/es2/water.vert"
"shaders/gl3/water.frag"
"shaders/gl3/water.vert"
)
qt6_add_resources(advancedcustommaterial "shaders"
PREFIX
"/"
FILES
${shaders_resource_files}
)
install(TARGETS advancedcustommaterial
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -45,7 +45,9 @@ qt6_add_resources(advancedcustommaterial "qml"
FILES
${qml_resource_files}
)
# special case begin
target_sources(advancedcustommaterial PRIVATE ${qml_resource_files}) # just to show qml files in creator
# special case end
set(models_resource_files
"models/waterPlane.obj"

View File

@ -19,6 +19,12 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DExtras)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(anaglyph-rendering
main.cpp

View File

@ -17,6 +17,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS Multimedia)

View File

@ -17,6 +17,10 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DExtras)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(basicshapes-cpp

View File

@ -17,6 +17,10 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS Qml)

View File

@ -0,0 +1,52 @@
# Generated from controls.pro.
cmake_minimum_required(VERSION 3.14)
project(controls LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
add_qt_gui_executable(controls
main.cpp
)
target_link_libraries(controls PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(controls_resource_files
"Logo.qml"
"Qt_logo.obj"
"main.qml"
)
qt6_add_resources(controls "controls"
PREFIX
"/"
FILES
${controls_resource_files}
)
install(TARGETS controls
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -44,7 +44,10 @@ qt6_add_resources(controls "controls"
FILES
${controls_resource_files}
)
# special case begin
target_sources(controls PRIVATE ${controls_resources_files}) # just to show qml files in creator
# special case end
install(TARGETS controls
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"

View File

@ -19,6 +19,11 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(instanced-arrays-qml
instancebuffer.cpp instancebuffer.h

View File

@ -19,6 +19,11 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(lights
main.cpp

View File

@ -17,8 +17,13 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(multiviewport
main.cpp

View File

@ -17,8 +17,13 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(pbr-materials
main.cpp

View File

@ -19,6 +19,11 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(phong-cubes
main.cpp

View File

@ -9,13 +9,24 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(INSTALL_EXAMPLEDIR "examples")
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS Concurrent)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DQuickRender)
find_package(Qt6 COMPONENTS 3DQuickInput)
find_package(Qt6 COMPONENTS 3DQuickExtras)
find_package(Qt6 COMPONENTS Network)
add_qt_gui_executable(planets-qml

View File

@ -19,6 +19,12 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DExtras)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(qardboard
abstractdeviceorientation.cpp abstractdeviceorientation.h

View File

@ -17,6 +17,11 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
@ -25,8 +30,8 @@ add_qt_gui_executable(qgltf
)
target_link_libraries(qgltf PUBLIC
Qt::3DCore
Qt::3DExtras
3dquick
Qt::3DInput
Qt::3DQuick
Qt::3DQuickExtras
Qt::3DRender
Qt::Core

View File

@ -0,0 +1,56 @@
# Generated from scene2d.pro.
cmake_minimum_required(VERSION 3.14)
project(scene2d LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(scene2d
main.cpp
)
target_link_libraries(scene2d PUBLIC
Qt::3DQuick
Qt::3DQuickExtras
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(scene2d_resource_files
"LogoControls.qml"
"Qt_logo.obj"
"main.qml"
)
qt6_add_resources(scene2d "scene2d"
PREFIX
"/"
FILES
${scene2d_resource_files}
)
install(TARGETS scene2d
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -19,11 +19,13 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(scene2dsample
add_qt_gui_executable(scene2dsample # special case
main.cpp
)
target_link_libraries(scene2dsample PUBLIC
target_link_libraries(scene2dsample PUBLIC # special case
Qt::3DQuick
Qt::3DQuickExtras
Qt::Core
@ -40,14 +42,14 @@ set(scene2d_resource_files
"main.qml"
)
qt6_add_resources(scene2dsample "scene2d"
qt6_add_resources(scene2dsample "scene2d" # special case
PREFIX
"/"
FILES
${scene2d_resource_files}
)
install(TARGETS scene2dsample
install(TARGETS scene2dsample # special case
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"

View File

@ -0,0 +1,53 @@
# Generated from scene3d.pro.
cmake_minimum_required(VERSION 3.14)
project(scene3d LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DInput)
add_qt_gui_executable(scene3d
main.cpp
)
target_link_libraries(scene3d PUBLIC
Qt::3DInput
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(scene3d_resource_files
"AnimatedEntity.qml"
"main.qml"
)
qt6_add_resources(scene3d "scene3d"
PREFIX
"/"
FILES
${scene3d_resource_files}
)
install(TARGETS scene3d
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -19,6 +19,7 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DInput)
add_qt_gui_executable(scene3d
main.cpp
@ -44,7 +45,10 @@ qt6_add_resources(scene3d "scene3d"
FILES
${scene3d_resource_files}
)
# special case begin
target_sources(scene3d PRIVATE ${scene3d_resource_files})
# special case end
install(TARGETS scene3d
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"

View File

@ -19,6 +19,7 @@ find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DInput)
add_qt_gui_executable(scene3dview
main.cpp

View File

@ -17,8 +17,13 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(shadow-map-qml
main.cpp

View File

@ -17,6 +17,10 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DExtras)
add_qt_gui_executable(simple-cpp
main.cpp

View File

@ -0,0 +1,62 @@
# Generated from simple-qml.pro.
cmake_minimum_required(VERSION 3.14)
project(simple-qml LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DLogic)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(simple-qml
main.cpp
)
target_link_libraries(simple-qml PUBLIC
Qt::3DCore
Qt::3DInput
Qt::3DLogic
Qt::3DQuick
Qt::3DQuickExtras
Qt::3DRender
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(simple-qml_resource_files
"main.qml"
)
qt6_add_resources(simple-qml "simple-qml"
PREFIX
"/"
FILES
${simple-qml_resource_files}
)
install(TARGETS simple-qml
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -17,8 +17,14 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DLogic)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(simple-qml
main.cpp
@ -26,7 +32,7 @@ add_qt_gui_executable(simple-qml
target_link_libraries(simple-qml PUBLIC
Qt::3DCore
Qt::3DInput
3DLogic
Qt::3DLogic
Qt::3DQuick
Qt::3DQuickExtras
Qt::3DRender
@ -49,7 +55,9 @@ qt6_add_resources(simple-qml "simple-qml"
${simple-qml_resource_files}
)
# special case begin
target_sources(simple-qml PRIVATE ${simple-qml_resource_files})
# special case end
install(TARGETS simple-qml
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"

View File

@ -0,0 +1,73 @@
# Generated from wave.pro.
cmake_minimum_required(VERSION 3.14)
project(wave LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(wave
main.cpp
)
target_link_libraries(wave PUBLIC
Qt::3DCore
Qt::3DInput
Qt::3DQuick
Qt::3DQuickExtras
Qt::3DRender
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
# Resources:
set(wave_resource_files
"Background.qml"
"BackgroundEffect.qml"
"BasicCamera.qml"
"Wave.qml"
"WaveEffect.qml"
"WaveForwardRenderer.qml"
"WaveMaterial.qml"
"main.qml"
"shaders/background.frag"
"shaders/background.vert"
"shaders/ribbon.frag"
"shaders/ribbon.vert"
"shaders/ribbonwireframe.frag"
"shaders/robustwireframe.geom"
)
qt6_add_resources(wave "wave"
PREFIX
"/"
FILES
${wave_resource_files}
)
install(TARGETS wave
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)

View File

@ -17,8 +17,13 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(wave
main.cpp
@ -61,7 +66,9 @@ qt6_add_resources(wave "wave"
${wave_resource_files}
)
# special case begin
target_sources(wave PRIVATE ${wave_resource_files})
# special case end
install(TARGETS wave
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"

View File

@ -21,6 +21,7 @@ find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS QuickWidgets)
find_package(Qt6 COMPONENTS 3DInput)
add_qt_gui_executable(widgets-scene3d
main.cpp

View File

@ -17,8 +17,13 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS 3DCore)
find_package(Qt6 COMPONENTS 3DRender)
find_package(Qt6 COMPONENTS 3DInput)
find_package(Qt6 COMPONENTS 3DQuick)
find_package(Qt6 COMPONENTS Qml)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS 3DQuickExtras)
add_qt_gui_executable(wireframe
main.cpp