diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-16 10:42:05 +0100 |
---|---|---|
committer | Leander Beernaert <leander.beernaert@qt.io> | 2020-01-24 12:29:18 +0000 |
commit | 48c82e90af12da74c713665ddfd7f8d825ae5bdb (patch) | |
tree | 0efa87b0cd1b00c47fce0b566a7a0cbb35fed786 /examples/opengl | |
parent | 502d3d6744913899da87acfda5ebdab42c40329e (diff) | |
download | qtbase-48c82e90af12da74c713665ddfd7f8d825ae5bdb.tar.gz |
Post Merge Fixes
Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/opengl')
19 files changed, 50 insertions, 28 deletions
diff --git a/examples/opengl/2dpainting/CMakeLists.txt b/examples/opengl/2dpainting/CMakeLists.txt index ccc26d5cff..1144830659 100644 --- a/examples/opengl/2dpainting/CMakeLists.txt +++ b/examples/opengl/2dpainting/CMakeLists.txt @@ -9,11 +9,12 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/2dpainting") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(2dpainting glwidget.cpp glwidget.h @@ -25,6 +26,7 @@ add_qt_gui_executable(2dpainting target_link_libraries(2dpainting PUBLIC Qt::Core Qt::Gui + Qt::OpenGL Qt::Widgets ) diff --git a/examples/opengl/computegles31/CMakeLists.txt b/examples/opengl/computegles31/CMakeLists.txt index 306fe8638e..2012fca361 100644 --- a/examples/opengl/computegles31/CMakeLists.txt +++ b/examples/opengl/computegles31/CMakeLists.txt @@ -9,10 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/computegles31") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(computegles31 glwindow.cpp glwindow.h @@ -21,8 +22,10 @@ add_qt_gui_executable(computegles31 target_link_libraries(computegles31 PUBLIC Qt::Core Qt::Gui + Qt::OpenGL ) + # Resources: set(computegles31_resource_files "Qt-logo-medium.png" @@ -35,7 +38,6 @@ qt6_add_resources(computegles31 "computegles31" ${computegles31_resource_files} ) - install(TARGETS computegles31 RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/contextinfo/CMakeLists.txt b/examples/opengl/contextinfo/CMakeLists.txt index dca5b9bab4..d174946ad6 100644 --- a/examples/opengl/contextinfo/CMakeLists.txt +++ b/examples/opengl/contextinfo/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/contextinfo") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/opengl/cube/CMakeLists.txt b/examples/opengl/cube/CMakeLists.txt index 8527a966ae..cb7c78080e 100644 --- a/examples/opengl/cube/CMakeLists.txt +++ b/examples/opengl/cube/CMakeLists.txt @@ -9,11 +9,12 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/cube") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(cube geometryengine.cpp geometryengine.h @@ -23,9 +24,11 @@ add_qt_gui_executable(cube target_link_libraries(cube PUBLIC Qt::Core Qt::Gui + Qt::OpenGL Qt::Widgets ) + # Resources: set(shaders_resource_files "fshader.glsl" @@ -49,7 +52,6 @@ qt6_add_resources(cube "textures" ${textures_resource_files} ) - install(TARGETS cube RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/hellogl2/CMakeLists.txt b/examples/opengl/hellogl2/CMakeLists.txt index 06ea78d959..5df3c811e5 100644 --- a/examples/opengl/hellogl2/CMakeLists.txt +++ b/examples/opengl/hellogl2/CMakeLists.txt @@ -9,11 +9,12 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/hellogl2") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(hellogl2 glwidget.cpp glwidget.h @@ -25,6 +26,7 @@ add_qt_gui_executable(hellogl2 target_link_libraries(hellogl2 PUBLIC Qt::Core Qt::Gui + Qt::OpenGL Qt::Widgets ) diff --git a/examples/opengl/hellogles3/CMakeLists.txt b/examples/opengl/hellogles3/CMakeLists.txt index d642b214c8..7e8a5e57a7 100644 --- a/examples/opengl/hellogles3/CMakeLists.txt +++ b/examples/opengl/hellogles3/CMakeLists.txt @@ -9,10 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/hellogles3") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(hellogles3 ../hellogl2/logo.cpp ../hellogl2/logo.h @@ -22,8 +23,10 @@ add_qt_gui_executable(hellogles3 target_link_libraries(hellogles3 PUBLIC Qt::Core Qt::Gui + Qt::OpenGL ) + # Resources: set(hellogles3_resource_files "qtlogo.png" @@ -36,7 +39,6 @@ qt6_add_resources(hellogles3 "hellogles3" ${hellogles3_resource_files} ) - install(TARGETS hellogles3 RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/hellowindow/CMakeLists.txt b/examples/opengl/hellowindow/CMakeLists.txt index 341b52b2cb..95f627be9d 100644 --- a/examples/opengl/hellowindow/CMakeLists.txt +++ b/examples/opengl/hellowindow/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/hellowindow") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) @@ -22,6 +22,7 @@ target_link_libraries(hellowindow PRIVATE Qt::CorePrivate Qt::GuiPrivate ) + target_link_libraries(hellowindow PUBLIC Qt::Core Qt::Gui diff --git a/examples/opengl/legacy/framebufferobject2/CMakeLists.txt b/examples/opengl/legacy/framebufferobject2/CMakeLists.txt index 74b00e8359..550700959d 100644 --- a/examples/opengl/legacy/framebufferobject2/CMakeLists.txt +++ b/examples/opengl/legacy/framebufferobject2/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/legacy/framebufferobject2") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) @@ -27,6 +27,7 @@ target_link_libraries(framebufferobject2 PUBLIC Qt::Widgets ) + # Resources: set(framebufferobject2_resource_files "cubelogo.png" @@ -39,7 +40,6 @@ qt6_add_resources(framebufferobject2 "framebufferobject2" ${framebufferobject2_resource_files} ) - install(TARGETS framebufferobject2 RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/legacy/grabber/CMakeLists.txt b/examples/opengl/legacy/grabber/CMakeLists.txt index 13ffd6fc31..709f3ce24d 100644 --- a/examples/opengl/legacy/grabber/CMakeLists.txt +++ b/examples/opengl/legacy/grabber/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/legacy/grabber") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/opengl/legacy/hellogl/CMakeLists.txt b/examples/opengl/legacy/hellogl/CMakeLists.txt index 5e61d52964..436f3190cc 100644 --- a/examples/opengl/legacy/hellogl/CMakeLists.txt +++ b/examples/opengl/legacy/hellogl/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/legacy/hellogl") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) @@ -25,6 +25,7 @@ add_qt_gui_executable(hellogl target_include_directories(hellogl PUBLIC ../shared ) + target_link_libraries(hellogl PUBLIC Qt::Core Qt::Gui diff --git a/examples/opengl/legacy/overpainting/CMakeLists.txt b/examples/opengl/legacy/overpainting/CMakeLists.txt index 4addb8a3c6..ee278eb04f 100644 --- a/examples/opengl/legacy/overpainting/CMakeLists.txt +++ b/examples/opengl/legacy/overpainting/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/legacy/overpainting") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) @@ -25,6 +25,7 @@ add_qt_gui_executable(overpainting target_include_directories(overpainting PUBLIC ../shared ) + target_link_libraries(overpainting PUBLIC Qt::Core Qt::Gui diff --git a/examples/opengl/legacy/pbuffers/CMakeLists.txt b/examples/opengl/legacy/pbuffers/CMakeLists.txt index eb3de5535a..c468496208 100644 --- a/examples/opengl/legacy/pbuffers/CMakeLists.txt +++ b/examples/opengl/legacy/pbuffers/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/legacy/pbuffers") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) @@ -28,6 +28,7 @@ target_link_libraries(pbuffers PUBLIC Qt::Widgets ) + # Resources: set(pbuffers_resource_files "cubelogo.png" @@ -40,7 +41,6 @@ qt6_add_resources(pbuffers "pbuffers" ${pbuffers_resource_files} ) - install(TARGETS pbuffers RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/legacy/pbuffers2/CMakeLists.txt b/examples/opengl/legacy/pbuffers2/CMakeLists.txt index b82e2f35c6..09284cb9c1 100644 --- a/examples/opengl/legacy/pbuffers2/CMakeLists.txt +++ b/examples/opengl/legacy/pbuffers2/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/legacy/pbuffers2") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) @@ -29,6 +29,7 @@ target_link_libraries(pbuffers2 PUBLIC Qt::Widgets ) + # Resources: set(pbuffers2_resource_files "bubbles.svg" @@ -42,7 +43,6 @@ qt6_add_resources(pbuffers2 "pbuffers2" ${pbuffers2_resource_files} ) - install(TARGETS pbuffers2 RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/legacy/samplebuffers/CMakeLists.txt b/examples/opengl/legacy/samplebuffers/CMakeLists.txt index 3d500fa55e..9a9edc16e1 100644 --- a/examples/opengl/legacy/samplebuffers/CMakeLists.txt +++ b/examples/opengl/legacy/samplebuffers/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/legacy/samplebuffers") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/opengl/paintedwindow/CMakeLists.txt b/examples/opengl/paintedwindow/CMakeLists.txt index 7333b0697c..6d36a0e001 100644 --- a/examples/opengl/paintedwindow/CMakeLists.txt +++ b/examples/opengl/paintedwindow/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/paintedwindow") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) diff --git a/examples/opengl/qopenglwidget/CMakeLists.txt b/examples/opengl/qopenglwidget/CMakeLists.txt index 1531343a28..586bd7130a 100644 --- a/examples/opengl/qopenglwidget/CMakeLists.txt +++ b/examples/opengl/qopenglwidget/CMakeLists.txt @@ -9,11 +9,12 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/qopenglwidget") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(qopenglwidget bubble.cpp bubble.h @@ -24,9 +25,11 @@ add_qt_gui_executable(qopenglwidget target_link_libraries(qopenglwidget PUBLIC Qt::Core Qt::Gui + Qt::OpenGL Qt::Widgets ) + # Resources: set(texture_resource_files "qt.png" @@ -39,7 +42,6 @@ qt6_add_resources(qopenglwidget "texture" ${texture_resource_files} ) - install(TARGETS qopenglwidget RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/qopenglwindow/CMakeLists.txt b/examples/opengl/qopenglwindow/CMakeLists.txt index 182262791e..9d354d376b 100644 --- a/examples/opengl/qopenglwindow/CMakeLists.txt +++ b/examples/opengl/qopenglwindow/CMakeLists.txt @@ -9,10 +9,11 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/qopenglwindow") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(qopenglwindow background_renderer.cpp background_renderer.h @@ -21,11 +22,14 @@ add_qt_gui_executable(qopenglwindow target_include_directories(qopenglwindow PUBLIC . ) + target_link_libraries(qopenglwindow PUBLIC Qt::Core Qt::Gui + Qt::OpenGL ) + # Resources: set(shaders_resource_files "background.frag" @@ -38,7 +42,6 @@ qt6_add_resources(qopenglwindow "shaders" ${shaders_resource_files} ) - install(TARGETS qopenglwindow RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/textures/CMakeLists.txt b/examples/opengl/textures/CMakeLists.txt index 69ae694f74..8e4f7788e1 100644 --- a/examples/opengl/textures/CMakeLists.txt +++ b/examples/opengl/textures/CMakeLists.txt @@ -9,11 +9,12 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/textures") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(textures glwidget.cpp glwidget.h @@ -23,9 +24,11 @@ add_qt_gui_executable(textures target_link_libraries(textures PUBLIC Qt::Core Qt::Gui + Qt::OpenGL Qt::Widgets ) + # Resources: set(textures_resource_files "images/side1.png" @@ -43,7 +46,6 @@ qt6_add_resources(textures "textures" ${textures_resource_files} ) - install(TARGETS textures RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/opengl/threadedqopenglwidget/CMakeLists.txt b/examples/opengl/threadedqopenglwidget/CMakeLists.txt index 20bee78283..a295c63f71 100644 --- a/examples/opengl/threadedqopenglwidget/CMakeLists.txt +++ b/examples/opengl/threadedqopenglwidget/CMakeLists.txt @@ -9,11 +9,12 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/opengl/threadedqopenglwidget") find_package(Qt6 COMPONENTS Core) find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS OpenGL) add_qt_gui_executable(threadedqopenglwidget glwidget.cpp glwidget.h @@ -23,6 +24,7 @@ add_qt_gui_executable(threadedqopenglwidget target_link_libraries(threadedqopenglwidget PUBLIC Qt::Core Qt::Gui + Qt::OpenGL Qt::Widgets ) |