diff options
author | Kai Köhne <kai.koehne@qt.io> | 2022-02-14 19:42:01 +0100 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2022-02-19 08:56:55 +0100 |
commit | 36b4ac5206dde6859a02df0db406ebca0eda5111 (patch) | |
tree | 429069b9e7157a7321c649aeefc0288509866ffe /examples/wayland/ivi-compositor | |
parent | 00323844defd67b0edc76db1c56ba32433a232bf (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: I3ce281ae1fb44c8d54ee09860ddadd3dbbdf7271
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/wayland/ivi-compositor')
-rw-r--r-- | examples/wayland/ivi-compositor/CMakeLists.txt | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/examples/wayland/ivi-compositor/CMakeLists.txt b/examples/wayland/ivi-compositor/CMakeLists.txt index d198c8059..b78728eea 100644 --- a/examples/wayland/ivi-compositor/CMakeLists.txt +++ b/examples/wayland/ivi-compositor/CMakeLists.txt @@ -1,38 +1,31 @@ -# Generated from ivi-compositor.pro. - cmake_minimum_required(VERSION 3.16) project(ivi-compositor 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}/wayland/ivi-compositor") -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Qml) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml) qt_add_executable(ivi-compositor main.cpp ) + set_target_properties(ivi-compositor PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) + target_link_libraries(ivi-compositor PUBLIC Qt::Core Qt::Gui Qt::Qml ) - # Resources: set(ivi-compositor_resource_files "main.qml" |