summaryrefslogtreecommitdiffstats
path: root/examples/sensors/grue/CMakeLists.txt
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-02-14 19:15:29 +0100
committerKai Köhne <kai.koehne@qt.io>2022-02-21 10:24:46 +0100
commite318718f9ddd12f9328df249ae1b8f73b33f431c (patch)
tree2129c3eebf1d09d39af2a9be1b7aff89137d16fa /examples/sensors/grue/CMakeLists.txt
parent041427535851f61e6db845ada3ea771eb89ac63b (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/CMakeLists.txt')
-rw-r--r--examples/sensors/grue/CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/sensors/grue/CMakeLists.txt b/examples/sensors/grue/CMakeLists.txt
index 54ef3e3e..8bdc8d03 100644
--- a/examples/sensors/grue/CMakeLists.txt
+++ b/examples/sensors/grue/CMakeLists.txt
@@ -1,11 +1,7 @@
cmake_minimum_required(VERSION 3.16)
project(grue_app 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")
@@ -13,11 +9,12 @@ endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sensors/grue")
-find_package(Qt6 COMPONENTS Quick Sensors)
+find_package(Qt6 REQUIRED COMPONENTS Quick Sensors)
qt_add_executable(grue_app
main.cpp qmlgruesensor.h qmlgruesensor.cpp
)
+
set_target_properties(grue_app PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE