diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-02-14 16:06:13 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-21 10:29:57 +0000 |
commit | 93c907e882aa7de6c1d77b6d049ac35f11cd5be2 (patch) | |
tree | 4a540a3b7bd2dca8934c5145621b5ec580808f16 /examples/charts/selectedbar/CMakeLists.txt | |
parent | 29854ec6633310ca568d9b9df24939482fff22bf (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/selectedbar/CMakeLists.txt')
-rw-r--r-- | examples/charts/selectedbar/CMakeLists.txt | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/examples/charts/selectedbar/CMakeLists.txt b/examples/charts/selectedbar/CMakeLists.txt index a293d64b..34660bf9 100644 --- a/examples/charts/selectedbar/CMakeLists.txt +++ b/examples/charts/selectedbar/CMakeLists.txt @@ -1,32 +1,26 @@ -# Generated from selectedbar.pro. - cmake_minimum_required(VERSION 3.16) project(selectedbar 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/selectedbar") -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(selectedbar utilities.h utilities.cpp main.cpp ) + set_target_properties(selectedbar PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(selectedbar PUBLIC Qt::Charts Qt::Core |