summaryrefslogtreecommitdiffstats
path: root/examples/opengl/qopenglwindow/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/qopenglwindow/CMakeLists.txt')
-rw-r--r--examples/opengl/qopenglwindow/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
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}"