cmake: add examples/opengl
Fixes: QTBUG-78164 Change-Id: Iccc8bb1354d2362c950de17a6c00e00f95272967 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
This commit is contained in:
parent
331d1cf9fd
commit
d8c3375dbd
@ -41,7 +41,7 @@ if(TARGET Qt::Gui)
|
||||
add_subdirectory(gui)
|
||||
|
||||
if(QT_FEATURE_opengl)
|
||||
# add_subdirectory(opengl) # special case: removed
|
||||
add_subdirectory(opengl)
|
||||
endif()
|
||||
|
||||
if(QT_FEATURE_vulkan)
|
||||
|
35
examples/opengl/2dpainting/CMakeLists.txt
Normal file
35
examples/opengl/2dpainting/CMakeLists.txt
Normal file
@ -0,0 +1,35 @@
|
||||
# Generated from 2dpainting.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(2dpainting LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(2dpainting
|
||||
glwidget.cpp glwidget.h
|
||||
helper.cpp helper.h
|
||||
main.cpp
|
||||
widget.cpp widget.h
|
||||
window.cpp window.h
|
||||
)
|
||||
target_link_libraries(2dpainting PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS 2dpainting
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
16
examples/opengl/CMakeLists.txt
Normal file
16
examples/opengl/CMakeLists.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# Generated from opengl.pro.
|
||||
|
||||
add_subdirectory(hellowindow)
|
||||
add_subdirectory(paintedwindow)
|
||||
add_subdirectory(qopenglwindow)
|
||||
if(TARGET Qt::Widgets)
|
||||
add_subdirectory(contextinfo)
|
||||
add_subdirectory(threadedqopenglwidget)
|
||||
add_subdirectory(2dpainting)
|
||||
add_subdirectory(hellogl2)
|
||||
add_subdirectory(qopenglwidget)
|
||||
add_subdirectory(cube)
|
||||
add_subdirectory(textures)
|
||||
add_subdirectory(hellogles3)
|
||||
add_subdirectory(computegles31)
|
||||
endif()
|
43
examples/opengl/computegles31/CMakeLists.txt
Normal file
43
examples/opengl/computegles31/CMakeLists.txt
Normal file
@ -0,0 +1,43 @@
|
||||
# Generated from computegles31.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(computegles31 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
|
||||
add_qt_gui_executable(computegles31
|
||||
glwindow.cpp glwindow.h
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(computegles31 PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(computegles31_resource_files
|
||||
"Qt-logo-medium.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(computegles31 "computegles31"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${computegles31_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS computegles31
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
33
examples/opengl/contextinfo/CMakeLists.txt
Normal file
33
examples/opengl/contextinfo/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
||||
# Generated from contextinfo.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(contextinfo LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(contextinfo
|
||||
main.cpp
|
||||
renderwindow.cpp renderwindow.h
|
||||
widget.cpp widget.h
|
||||
)
|
||||
target_link_libraries(contextinfo PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS contextinfo
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
57
examples/opengl/cube/CMakeLists.txt
Normal file
57
examples/opengl/cube/CMakeLists.txt
Normal file
@ -0,0 +1,57 @@
|
||||
# Generated from cube.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(cube LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(cube
|
||||
geometryengine.cpp geometryengine.h
|
||||
main.cpp
|
||||
mainwidget.cpp mainwidget.h
|
||||
)
|
||||
target_link_libraries(cube PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(shaders_resource_files
|
||||
"fshader.glsl"
|
||||
"vshader.glsl"
|
||||
)
|
||||
|
||||
qt6_add_resources(cube "shaders"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${shaders_resource_files}
|
||||
)
|
||||
set(textures_resource_files
|
||||
"cube.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(cube "textures"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${textures_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS cube
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
35
examples/opengl/hellogl2/CMakeLists.txt
Normal file
35
examples/opengl/hellogl2/CMakeLists.txt
Normal file
@ -0,0 +1,35 @@
|
||||
# Generated from hellogl2.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(hellogl2 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(hellogl2
|
||||
glwidget.cpp glwidget.h
|
||||
logo.cpp logo.h
|
||||
main.cpp
|
||||
mainwindow.cpp mainwindow.h
|
||||
window.cpp window.h
|
||||
)
|
||||
target_link_libraries(hellogl2 PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS hellogl2
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
44
examples/opengl/hellogles3/CMakeLists.txt
Normal file
44
examples/opengl/hellogles3/CMakeLists.txt
Normal file
@ -0,0 +1,44 @@
|
||||
# Generated from hellogles3.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(hellogles3 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
|
||||
add_qt_gui_executable(hellogles3
|
||||
../hellogl2/logo.cpp ../hellogl2/logo.h
|
||||
glwindow.cpp glwindow.h
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(hellogles3 PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(hellogles3_resource_files
|
||||
"qtlogo.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(hellogles3 "hellogles3"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${hellogles3_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS hellogles3
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
34
examples/opengl/hellowindow/CMakeLists.txt
Normal file
34
examples/opengl/hellowindow/CMakeLists.txt
Normal file
@ -0,0 +1,34 @@
|
||||
# Generated from hellowindow.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(hellowindow LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
|
||||
add_qt_gui_executable(hellowindow
|
||||
hellowindow.cpp hellowindow.h
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(hellowindow PRIVATE
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
)
|
||||
target_link_libraries(hellowindow PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
)
|
||||
|
||||
install(TARGETS hellowindow
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
13
examples/opengl/legacy/CMakeLists.txt
Normal file
13
examples/opengl/legacy/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Generated from legacy.pro.
|
||||
|
||||
if(NOT TARGET Qt::OpenGL)
|
||||
return()
|
||||
endif()
|
||||
if(NOT QT_FEATURE_dynamicgl AND NOT QT_FEATURE_opengles2)
|
||||
add_subdirectory(grabber)
|
||||
add_subdirectory(hellogl)
|
||||
add_subdirectory(overpainting)
|
||||
add_subdirectory(pbuffers)
|
||||
add_subdirectory(framebufferobject2)
|
||||
add_subdirectory(samplebuffers)
|
||||
endif()
|
47
examples/opengl/legacy/framebufferobject2/CMakeLists.txt
Normal file
47
examples/opengl/legacy/framebufferobject2/CMakeLists.txt
Normal file
@ -0,0 +1,47 @@
|
||||
# Generated from framebufferobject2.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(framebufferobject2 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS OpenGL)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(framebufferobject2
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(framebufferobject2 PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::OpenGL
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(framebufferobject2_resource_files
|
||||
"cubelogo.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(framebufferobject2 "framebufferobject2"
|
||||
PREFIX
|
||||
"/res"
|
||||
FILES
|
||||
${framebufferobject2_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS framebufferobject2
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
35
examples/opengl/legacy/grabber/CMakeLists.txt
Normal file
35
examples/opengl/legacy/grabber/CMakeLists.txt
Normal file
@ -0,0 +1,35 @@
|
||||
# Generated from grabber.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(grabber LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS OpenGL)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(grabber
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
mainwindow.cpp mainwindow.h
|
||||
)
|
||||
target_link_libraries(grabber PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::OpenGL
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS grabber
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
39
examples/opengl/legacy/hellogl/CMakeLists.txt
Normal file
39
examples/opengl/legacy/hellogl/CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
||||
# Generated from hellogl.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(hellogl LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS OpenGL)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(hellogl
|
||||
../shared/qtlogo.cpp ../shared/qtlogo.h
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
window.cpp window.h
|
||||
)
|
||||
target_include_directories(hellogl PUBLIC
|
||||
../shared
|
||||
)
|
||||
target_link_libraries(hellogl PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::OpenGL
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS hellogl
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
39
examples/opengl/legacy/overpainting/CMakeLists.txt
Normal file
39
examples/opengl/legacy/overpainting/CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
||||
# Generated from overpainting.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(overpainting LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS OpenGL)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(overpainting
|
||||
../shared/qtlogo.cpp ../shared/qtlogo.h
|
||||
bubble.cpp bubble.h
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
)
|
||||
target_include_directories(overpainting PUBLIC
|
||||
../shared
|
||||
)
|
||||
target_link_libraries(overpainting PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::OpenGL
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS overpainting
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
48
examples/opengl/legacy/pbuffers/CMakeLists.txt
Normal file
48
examples/opengl/legacy/pbuffers/CMakeLists.txt
Normal file
@ -0,0 +1,48 @@
|
||||
# Generated from pbuffers.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(pbuffers LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS OpenGL)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(pbuffers
|
||||
cube.cpp cube.h
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(pbuffers PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::OpenGL
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(pbuffers_resource_files
|
||||
"cubelogo.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(pbuffers "pbuffers"
|
||||
PREFIX
|
||||
"/res"
|
||||
FILES
|
||||
${pbuffers_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS pbuffers
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
50
examples/opengl/legacy/pbuffers2/CMakeLists.txt
Normal file
50
examples/opengl/legacy/pbuffers2/CMakeLists.txt
Normal file
@ -0,0 +1,50 @@
|
||||
# Generated from pbuffers2.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(pbuffers2 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS OpenGL)
|
||||
find_package(Qt6 COMPONENTS Svg)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(pbuffers2
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(pbuffers2 PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::OpenGL
|
||||
Qt::Svg
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(pbuffers2_resource_files
|
||||
"bubbles.svg"
|
||||
"designer.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(pbuffers2 "pbuffers2"
|
||||
PREFIX
|
||||
"/res"
|
||||
FILES
|
||||
${pbuffers2_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS pbuffers2
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
34
examples/opengl/legacy/samplebuffers/CMakeLists.txt
Normal file
34
examples/opengl/legacy/samplebuffers/CMakeLists.txt
Normal file
@ -0,0 +1,34 @@
|
||||
# Generated from samplebuffers.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(samplebuffers LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS OpenGL)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(samplebuffers
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
)
|
||||
target_link_libraries(samplebuffers PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::OpenGL
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS samplebuffers
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
30
examples/opengl/paintedwindow/CMakeLists.txt
Normal file
30
examples/opengl/paintedwindow/CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
||||
# Generated from paintedwindow.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(paintedwindow LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
|
||||
add_qt_gui_executable(paintedwindow
|
||||
main.cpp
|
||||
paintedwindow.cpp paintedwindow.h
|
||||
)
|
||||
target_link_libraries(paintedwindow PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
)
|
||||
|
||||
install(TARGETS paintedwindow
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
47
examples/opengl/qopenglwidget/CMakeLists.txt
Normal file
47
examples/opengl/qopenglwidget/CMakeLists.txt
Normal file
@ -0,0 +1,47 @@
|
||||
# Generated from qopenglwidget.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(qopenglwidget LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(qopenglwidget
|
||||
bubble.cpp bubble.h
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
mainwindow.cpp mainwindow.h
|
||||
)
|
||||
target_link_libraries(qopenglwidget PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(texture_resource_files
|
||||
"qt.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(qopenglwidget "texture"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${texture_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS qopenglwidget
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
46
examples/opengl/qopenglwindow/CMakeLists.txt
Normal file
46
examples/opengl/qopenglwindow/CMakeLists.txt
Normal file
@ -0,0 +1,46 @@
|
||||
# Generated from qopenglwindow.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(qopenglwindow LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
|
||||
add_qt_gui_executable(qopenglwindow
|
||||
background_renderer.cpp background_renderer.h
|
||||
main.cpp
|
||||
)
|
||||
target_include_directories(qopenglwindow PUBLIC
|
||||
.
|
||||
)
|
||||
target_link_libraries(qopenglwindow PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(shaders_resource_files
|
||||
"background.frag"
|
||||
)
|
||||
|
||||
qt6_add_resources(qopenglwindow "shaders"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${shaders_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS qopenglwindow
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
51
examples/opengl/textures/CMakeLists.txt
Normal file
51
examples/opengl/textures/CMakeLists.txt
Normal file
@ -0,0 +1,51 @@
|
||||
# Generated from textures.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(textures LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(textures
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
window.cpp window.h
|
||||
)
|
||||
target_link_libraries(textures PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
# Resources:
|
||||
set(textures_resource_files
|
||||
"images/side1.png"
|
||||
"images/side2.png"
|
||||
"images/side3.png"
|
||||
"images/side4.png"
|
||||
"images/side5.png"
|
||||
"images/side6.png"
|
||||
)
|
||||
|
||||
qt6_add_resources(textures "textures"
|
||||
PREFIX
|
||||
"/"
|
||||
FILES
|
||||
${textures_resource_files}
|
||||
)
|
||||
|
||||
|
||||
install(TARGETS textures
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
33
examples/opengl/threadedqopenglwidget/CMakeLists.txt
Normal file
33
examples/opengl/threadedqopenglwidget/CMakeLists.txt
Normal file
@ -0,0 +1,33 @@
|
||||
# Generated from threadedqopenglwidget.pro.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(threadedqopenglwidget LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
set(INSTALL_EXAMPLEDIR "examples")
|
||||
|
||||
find_package(Qt6 COMPONENTS Core)
|
||||
find_package(Qt6 COMPONENTS Gui)
|
||||
find_package(Qt6 COMPONENTS Widgets)
|
||||
|
||||
add_qt_gui_executable(threadedqopenglwidget
|
||||
glwidget.cpp glwidget.h
|
||||
main.cpp
|
||||
mainwindow.cpp mainwindow.h
|
||||
)
|
||||
target_link_libraries(threadedqopenglwidget PUBLIC
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::Widgets
|
||||
)
|
||||
|
||||
install(TARGETS threadedqopenglwidget
|
||||
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
|
||||
)
|
Loading…
Reference in New Issue
Block a user