diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-07-26 16:00:52 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-07-28 11:57:33 +0200 |
commit | 8a13e85d2e903cad88ff795aae23d47b9a9726ab (patch) | |
tree | cb2260e21efce4e8fa075b4edd4d6579ddb916af /examples/widgets | |
parent | 1a01b62f4218f0fcf5be7682e789f678a3c910dc (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.
Task-number: QTBUG-102879
Change-Id: I3c2e6c5a68a8c6ff9b98b79dbd6c83445d8da052
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 818a15234c8fb80cd9adad54bd726cf69726fa79)
Diffstat (limited to 'examples/widgets')
-rw-r--r-- | examples/widgets/tools/echoplugin/CMakeLists.txt | 4 | ||||
-rw-r--r-- | examples/widgets/tools/plugandpaint/CMakeLists.txt | 4 | ||||
-rw-r--r-- | examples/widgets/tools/styleplugin/CMakeLists.txt | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/widgets/tools/echoplugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/CMakeLists.txt index 6e32a4de09..69bb6e981a 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 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 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 e681812dad..cc1dae43ff 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 COMPONENTS Core Gui Widgets) - set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) @@ -13,5 +11,7 @@ endif() set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint") +find_package(Qt6 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 33412f5306..31c49cc754 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 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 COMPONENTS Widgets) + add_subdirectory(stylewindow) add_subdirectory(plugin) |