summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-07-26 16:00:52 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-07-27 16:37:54 +0200
commit818a15234c8fb80cd9adad54bd726cf69726fa79 (patch)
tree0ec6ddc3c2e65a999cd0418845db71691363dd38 /examples
parent22c3b87b14cfc5cf38463d641f122cff31fb757e (diff)
CMake: Make sure qtbase examples are installed into the correct path
The find_package calls need to happen after we set INSTALL_EXAMPLEDIR to ensure that INSTALL_EXAMPLEDIR is overridden if necessary. Pick-to: 6.2 6.3 6.4 Task-number: QTBUG-102879 Change-Id: I3c2e6c5a68a8c6ff9b98b79dbd6c83445d8da052 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/widgets/tools/echoplugin/CMakeLists.txt4
-rw-r--r--examples/widgets/tools/plugandpaint/CMakeLists.txt4
-rw-r--r--examples/widgets/tools/styleplugin/CMakeLists.txt4
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/widgets/tools/echoplugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/CMakeLists.txt
index 93b49b43d7..c0b50033e0 100644
--- a/examples/widgets/tools/echoplugin/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/CMakeLists.txt
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(plugandpaint LANGUAGES CXX)
-find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
-
set(CMAKE_AUTOMOC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
@@ -11,5 +9,7 @@ endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
+
add_subdirectory(plugin)
add_subdirectory(echowindow)
diff --git a/examples/widgets/tools/plugandpaint/CMakeLists.txt b/examples/widgets/tools/plugandpaint/CMakeLists.txt
index 54cb83fd89..9138a34757 100644
--- a/examples/widgets/tools/plugandpaint/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/CMakeLists.txt
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(plugandpaint LANGUAGES CXX)
-find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
-
set(CMAKE_AUTOMOC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
@@ -11,5 +9,7 @@ endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
+
add_subdirectory(plugins)
add_subdirectory(app)
diff --git a/examples/widgets/tools/styleplugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/CMakeLists.txt
index acd918786d..ab083d362e 100644
--- a/examples/widgets/tools/styleplugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/CMakeLists.txt
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(styleplugin LANGUAGES CXX)
-find_package(Qt6 REQUIRED COMPONENTS Widgets)
-
set(CMAKE_AUTOMOC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
@@ -11,5 +9,7 @@ endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin")
+find_package(Qt6 REQUIRED COMPONENTS Widgets)
+
add_subdirectory(stylewindow)
add_subdirectory(plugin)