summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2020-01-16 10:42:05 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2020-01-24 12:29:18 +0000
commit48c82e90af12da74c713665ddfd7f8d825ae5bdb (patch)
tree0efa87b0cd1b00c47fce0b566a7a0cbb35fed786 /examples
parent502d3d6744913899da87acfda5ebdab42c40329e (diff)
Post Merge Fixes
Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/2dpainting/CMakeLists.txt4
-rw-r--r--examples/opengl/computegles31/CMakeLists.txt6
-rw-r--r--examples/opengl/contextinfo/CMakeLists.txt2
-rw-r--r--examples/opengl/cube/CMakeLists.txt6
-rw-r--r--examples/opengl/hellogl2/CMakeLists.txt4
-rw-r--r--examples/opengl/hellogles3/CMakeLists.txt6
-rw-r--r--examples/opengl/hellowindow/CMakeLists.txt3
-rw-r--r--examples/opengl/legacy/framebufferobject2/CMakeLists.txt4
-rw-r--r--examples/opengl/legacy/grabber/CMakeLists.txt2
-rw-r--r--examples/opengl/legacy/hellogl/CMakeLists.txt3
-rw-r--r--examples/opengl/legacy/overpainting/CMakeLists.txt3
-rw-r--r--examples/opengl/legacy/pbuffers/CMakeLists.txt4
-rw-r--r--examples/opengl/legacy/pbuffers2/CMakeLists.txt4
-rw-r--r--examples/opengl/legacy/samplebuffers/CMakeLists.txt2
-rw-r--r--examples/opengl/paintedwindow/CMakeLists.txt2
-rw-r--r--examples/opengl/qopenglwidget/CMakeLists.txt6
-rw-r--r--examples/opengl/qopenglwindow/CMakeLists.txt7
-rw-r--r--examples/opengl/textures/CMakeLists.txt6
-rw-r--r--examples/opengl/threadedqopenglwidget/CMakeLists.txt4
-rw-r--r--examples/widgets/graphicsview/CMakeLists.txt4
-rw-r--r--examples/widgets/graphicsview/boxes/CMakeLists.txt39
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt185
-rw-r--r--examples/xml/CMakeLists.txt1
23 files changed, 232 insertions, 75 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
)
diff --git a/examples/widgets/graphicsview/CMakeLists.txt b/examples/widgets/graphicsview/CMakeLists.txt
index 19f60011e5..d7ef0fd0dc 100644
--- a/examples/widgets/graphicsview/CMakeLists.txt
+++ b/examples/widgets/graphicsview/CMakeLists.txt
@@ -14,7 +14,3 @@ add_subdirectory(flowlayout)
add_subdirectory(anchorlayout)
add_subdirectory(simpleanchorlayout)
add_subdirectory(weatheranchorlayout)
-
-if(TARGET Qt::OpenGL AND NOT QT_FEATURE_opengles2 AND NOT QT_FEATURE_dynamicgl)
- add_subdirectory(boxes)
-endif()
diff --git a/examples/widgets/graphicsview/boxes/CMakeLists.txt b/examples/widgets/graphicsview/boxes/CMakeLists.txt
deleted file mode 100644
index 0be040f90e..0000000000
--- a/examples/widgets/graphicsview/boxes/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Generated from boxes.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(boxes 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 OpenGL)
-find_package(Qt6 COMPONENTS Widgets)
-
-
-add_qt_gui_executable(boxes
- 3rdparty/fbm.c 3rdparty/fbm.h
- boxes.qrc
- glbuffers.cpp glbuffers.h
- glextensions.cpp glextensions.h
- gltrianglemesh.h
- main.cpp
- qtbox.cpp qtbox.h
- roundedbox.cpp roundedbox.h
- scene.cpp scene.h
- trackball.cpp trackball.h
-)
-target_link_libraries(boxes PUBLIC
- Qt::OpenGL
- Qt::Widgets
-)
-
-install(TARGETS boxes
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt
index 27f18bb848..9f5c24fe88 100644
--- a/examples/widgets/painting/pathstroke/CMakeLists.txt
+++ b/examples/widgets/painting/pathstroke/CMakeLists.txt
@@ -9,25 +9,204 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/pathstroke")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(pathstroke
../shared/arthurstyle.cpp ../shared/arthurstyle.h
../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
../shared/hoverpoints.cpp ../shared/hoverpoints.h
- ../shared/shared.qrc
main.cpp
- pathstroke.cpp pathstroke.h pathstroke.qrc
+ pathstroke.cpp pathstroke.h
)
target_include_directories(pathstroke PUBLIC
../shared
)
+
target_link_libraries(pathstroke PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(pathstroke "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(pathstroke_resource_files
+ "pathstroke.cpp"
+ "pathstroke.html"
+)
+
+qt6_add_resources(pathstroke "pathstroke"
+ PREFIX
+ "/res/pathstroke"
+ FILES
+ ${pathstroke_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(pathstroke PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(pathstroke PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS pathstroke
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/xml/CMakeLists.txt b/examples/xml/CMakeLists.txt
index af7f096d19..9291c191e0 100644
--- a/examples/xml/CMakeLists.txt
+++ b/examples/xml/CMakeLists.txt
@@ -5,7 +5,6 @@ add_subdirectory(xmlstreamlint)
if(TARGET Qt::Widgets)
add_subdirectory(dombookmarks)
- add_subdirectory(saxbookmarks)
add_subdirectory(streambookmarks)
if(TARGET Qt::Network)