summaryrefslogtreecommitdiffstats
path: root/examples/charts/horizontalstackedbarchart
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-02-14 16:06:13 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-21 10:29:57 +0000
commit93c907e882aa7de6c1d77b6d049ac35f11cd5be2 (patch)
tree4a540a3b7bd2dca8934c5145621b5ec580808f16 /examples/charts/horizontalstackedbarchart
parent29854ec6633310ca568d9b9df24939482fff22bf (diff)
Improve examples CMakeLists.txt
- Remove # generated from xyz.pro comment from pro2cmake - Remove "# special case" markers for pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Change-Id: Ia419531218b14a97699efcc4d6e41115c37ea83d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit a3ec2015794bc58a37b0017d86ba27d24987ff92) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/charts/horizontalstackedbarchart')
-rw-r--r--examples/charts/horizontalstackedbarchart/CMakeLists.txt14
1 files changed, 4 insertions, 10 deletions
diff --git a/examples/charts/horizontalstackedbarchart/CMakeLists.txt b/examples/charts/horizontalstackedbarchart/CMakeLists.txt
index 3a83038d..79b2d7a2 100644
--- a/examples/charts/horizontalstackedbarchart/CMakeLists.txt
+++ b/examples/charts/horizontalstackedbarchart/CMakeLists.txt
@@ -1,31 +1,25 @@
-# Generated from horizontalstackedbarchart.pro.
-
cmake_minimum_required(VERSION 3.16)
project(horizontalstackedbarchart LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/charts/horizontalstackedbarchart")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Charts)
+find_package(Qt6 REQUIRED COMPONENTS Charts Core Gui)
qt_add_executable(horizontalstackedbarchart
main.cpp
)
+
set_target_properties(horizontalstackedbarchart PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(horizontalstackedbarchart PUBLIC
Qt::Charts
Qt::Core