diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-02-14 19:15:29 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2022-02-21 10:24:46 +0100 |
commit | e318718f9ddd12f9328df249ae1b8f73b33f431c (patch) | |
tree | 2129c3eebf1d09d39af2a9be1b7aff89137d16fa /examples/sensors/grue/plugin | |
parent | 041427535851f61e6db845ada3ea771eb89ac63b (diff) |
Improve examples CMakeLists.txt
- Remove "# generated from xyz.pro" comment from 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: Ie7432614f6060152eb3278724877670059c71495
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/sensors/grue/plugin')
-rw-r--r-- | examples/sensors/grue/plugin/CMakeLists.txt | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/examples/sensors/grue/plugin/CMakeLists.txt b/examples/sensors/grue/plugin/CMakeLists.txt index 9a6325ac..10e554fe 100644 --- a/examples/sensors/grue/plugin/CMakeLists.txt +++ b/examples/sensors/grue/plugin/CMakeLists.txt @@ -1,22 +1,15 @@ -# Generated from plugin.pro. - cmake_minimum_required(VERSION 3.16) project(qtsensors_grue 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}/sensors/grue/sensors") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Sensors) +find_package(Qt6 REQUIRED COMPONENTS Core Sensors) qt_add_plugin(qtsensors_grue PLUGIN_TYPE sensors |