diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2023-01-11 09:38:15 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-16 19:16:52 +0000 |
commit | 9ea7d65526f76e2b1e2f1a2a9cf8d9ace20c2a44 (patch) | |
tree | 9289604cd4d037cf03ce4d69b600c41ceb962b41 /examples/quick/particles/system | |
parent | e0889520aecb73c4caf0ed3b33f8bddb549ba059 (diff) |
Quick examples: Modernize cmake files according to our guidelines
The following changes are made to the CMakeLists.txt files in all
quick examples:
- Use PRIVATE linkage when possible.
- Use qt_standard_project_setup()
- Set WIN32 and MACOSX_BUNDLE in qt_add_executable() instead of
set_target_properties()
Change-Id: I18217585aec56794b327f103d6959879df59d68a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7409c217e8691beae5cd195fc8a0e3479de1db77)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/quick/particles/system')
-rw-r--r-- | examples/quick/particles/system/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/quick/particles/system/CMakeLists.txt b/examples/quick/particles/system/CMakeLists.txt index 6eb2cb7e49..5df23081ac 100644 --- a/examples/quick/particles/system/CMakeLists.txt +++ b/examples/quick/particles/system/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(system LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,13 +12,15 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/particles/system") find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick) +qt_standard_project_setup() + add_subdirectory("../../shared" "shared") qt_add_executable(systemexample WIN32 MACOSX_BUNDLE main.cpp ) -target_link_libraries(systemexample PUBLIC +target_link_libraries(systemexample PRIVATE Qt::Core Qt::Gui Qt::Qml |