diff options
Diffstat (limited to 'examples/widgets/dialogs/licensewizard/CMakeLists.txt')
-rw-r--r-- | examples/widgets/dialogs/licensewizard/CMakeLists.txt | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt index 497cfff064..0cf2d61c8b 100644 --- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt +++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt @@ -1,16 +1,13 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + 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 @@ -21,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: @@ -42,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}) |