aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/window/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/window/CMakeLists.txt')
-rw-r--r--examples/quick/window/CMakeLists.txt21
1 files changed, 9 insertions, 12 deletions
diff --git a/examples/quick/window/CMakeLists.txt b/examples/quick/window/CMakeLists.txt
index 18c09aca59..294fd9cd53 100644
--- a/examples/quick/window/CMakeLists.txt
+++ b/examples/quick/window/CMakeLists.txt
@@ -4,8 +4,6 @@
cmake_minimum_required(VERSION 3.16)
project(window LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
if(NOT DEFINED INSTALL_EXAMPLESDIR)
set(INSTALL_EXAMPLESDIR "examples")
endif()
@@ -14,15 +12,21 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/window")
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+qt_standard_project_setup()
+
add_subdirectory("../shared" "shared")
qt_add_executable(windowexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(windowexample PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
+target_link_libraries(windowexample PRIVATE
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
)
qt_add_qml_module(windowexample
@@ -36,13 +40,6 @@ qt_add_qml_module(windowexample
"window.qml"
)
-target_link_libraries(windowexample PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
add_dependencies(windowexample window_shared)
install(TARGETS windowexample