summaryrefslogtreecommitdiffstats
path: root/examples/charts/qmlpolarchart
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-02-14 16:06:13 +0100
committerKai Köhne <kai.koehne@qt.io>2022-02-21 10:25:06 +0100
commita3ec2015794bc58a37b0017d86ba27d24987ff92 (patch)
treefd2d82b6eb878cfb076a37bd8a7fab3e6bf5cdca /examples/charts/qmlpolarchart
parent2937ae85d1a7b6134d2872dd2f56e4aae212cd93 (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 Pick-to: 6.3 Change-Id: Ia419531218b14a97699efcc4d6e41115c37ea83d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/charts/qmlpolarchart')
-rw-r--r--examples/charts/qmlpolarchart/CMakeLists.txt17
1 files changed, 4 insertions, 13 deletions
diff --git a/examples/charts/qmlpolarchart/CMakeLists.txt b/examples/charts/qmlpolarchart/CMakeLists.txt
index 39685151..37a01498 100644
--- a/examples/charts/qmlpolarchart/CMakeLists.txt
+++ b/examples/charts/qmlpolarchart/CMakeLists.txt
@@ -1,33 +1,25 @@
-# Generated from qmlpolarchart.pro.
-
cmake_minimum_required(VERSION 3.16)
project(qmlpolarchart 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/qmlpolarchart")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Charts)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 REQUIRED COMPONENTS Charts Core Gui Qml Quick)
qt_add_executable(qmlpolarchart
main.cpp
)
+
set_target_properties(qmlpolarchart PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(qmlpolarchart PUBLIC
Qt::Charts
Qt::Core
@@ -36,7 +28,6 @@ target_link_libraries(qmlpolarchart PUBLIC
Qt::Quick
)
-
# Resources:
set(resources_resource_files
"qml/qmlpolarchart/View1.qml"