summaryrefslogtreecommitdiffstats
path: root/examples/demos/stocqt
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-01-20 17:19:52 +0100
committerKai Köhne <kai.koehne@qt.io>2022-01-20 18:05:52 +0100
commit3dae1461ac3c6fed4303a5bf475c72d573d8c7c6 (patch)
treea2682e471984dbc79ca7f90854085e23f7164f63 /examples/demos/stocqt
parenta06c9e74fd545bb8b0b74ef59b1eb51d787d7727 (diff)
Examples: Improve CMakeLists.txt files
Pick-to: 6.2 6.3 Change-Id: I7582f6c1b9daacaf694355269663b1d6616e0c05 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/demos/stocqt')
-rw-r--r--examples/demos/stocqt/CMakeLists.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/demos/stocqt/CMakeLists.txt b/examples/demos/stocqt/CMakeLists.txt
index e23a227f7..bf9bdd679 100644
--- a/examples/demos/stocqt/CMakeLists.txt
+++ b/examples/demos/stocqt/CMakeLists.txt
@@ -1,5 +1,3 @@
-# Generated from stocqt.pro.
-
cmake_minimum_required(VERSION 3.16)
project(stocqt LANGUAGES CXX)
@@ -9,23 +7,22 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
+ set(INSTALL_EXAMPLESDIR "examples")
endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/demos/stocqt")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
qt_add_executable(stocqt
main.cpp
)
+
set_target_properties(stocqt PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
target_link_libraries(stocqt PUBLIC
Qt::Core
Qt::Gui
@@ -33,7 +30,6 @@ target_link_libraries(stocqt PUBLIC
Qt::Quick
)
-
# Resources:
set(stocqt_resource_files
"content/+windows/Settings.qml"