aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols/eventcalendar/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols/eventcalendar/CMakeLists.txt')
-rw-r--r--examples/quickcontrols/eventcalendar/CMakeLists.txt31
1 files changed, 17 insertions, 14 deletions
diff --git a/examples/quickcontrols/eventcalendar/CMakeLists.txt b/examples/quickcontrols/eventcalendar/CMakeLists.txt
index 92299b1870..43ed385a3e 100644
--- a/examples/quickcontrols/eventcalendar/CMakeLists.txt
+++ b/examples/quickcontrols/eventcalendar/CMakeLists.txt
@@ -1,17 +1,11 @@
# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: BSD-3-Clause
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
project(eventcalendar LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quickcontrols/eventcalendar")
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Sql)
qt_add_executable(eventcalendar
@@ -27,10 +21,10 @@ set_target_properties(eventcalendar PROPERTIES
)
target_link_libraries(eventcalendar PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Sql
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Sql
)
qt_add_qml_module(eventcalendar
@@ -44,7 +38,16 @@ qt_add_qml_module(eventcalendar
)
install(TARGETS eventcalendar
- 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_qml_app_script(
+ TARGET eventcalendar
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})