summaryrefslogtreecommitdiffstats
path: root/examples/widgets/dialogs/licensewizard/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/dialogs/licensewizard/CMakeLists.txt')
-rw-r--r--examples/widgets/dialogs/licensewizard/CMakeLists.txt33
1 files changed, 17 insertions, 16 deletions
diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
index b62a8e6a2c..0cf2d61c8b 100644
--- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
@@ -4,16 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(licensewizard LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/licensewizard")
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui PrintSupport Widgets)
+qt_standard_project_setup()
+
qt_add_executable(licensewizard
licensewizard.cpp licensewizard.h
main.cpp
@@ -24,11 +18,11 @@ set_target_properties(licensewizard PROPERTIES
MACOSX_BUNDLE TRUE
)
-target_link_libraries(licensewizard PUBLIC
- Qt::Core
- Qt::Gui
- Qt::PrintSupport
- Qt::Widgets
+target_link_libraries(licensewizard PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::PrintSupport
+ Qt6::Widgets
)
# Resources:
@@ -45,7 +39,14 @@ qt_add_resources(licensewizard "licensewizard"
)
install(TARGETS licensewizard
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_app_script(
+ TARGET licensewizard
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
)
+install(SCRIPT ${deploy_script})