summaryrefslogtreecommitdiffstats
path: root/examples/corelib/platform/androidnotifier/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib/platform/androidnotifier/CMakeLists.txt')
-rw-r--r--examples/corelib/platform/androidnotifier/CMakeLists.txt22
1 files changed, 12 insertions, 10 deletions
diff --git a/examples/corelib/platform/androidnotifier/CMakeLists.txt b/examples/corelib/platform/androidnotifier/CMakeLists.txt
index e5271edd79..b356b15a43 100644
--- a/examples/corelib/platform/androidnotifier/CMakeLists.txt
+++ b/examples/corelib/platform/androidnotifier/CMakeLists.txt
@@ -1,5 +1,5 @@
# 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(androidnotifier LANGUAGES CXX)
@@ -8,16 +8,10 @@ if(NOT ANDROID)
message(FATAL_ERROR "Example only works on Android")
endif()
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
find_package(Qt6 REQUIRED COMPONENTS Widgets)
qt_standard_project_setup()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/platform/androidnotifier")
-
qt_add_executable(androidnotifier
MANUAL_FINALIZATION
main.cpp
@@ -28,6 +22,7 @@ qt_add_executable(androidnotifier
)
target_link_libraries(androidnotifier PRIVATE
+ Qt6::CorePrivate
Qt6::Widgets
)
@@ -49,7 +44,14 @@ qt_add_resources(androidnotifier "main"
)
install(TARGETS androidnotifier
- 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 androidnotifier
+ OUTPUT_SCRIPT deploy_script
+ NO_UNSUPPORTED_PLATFORM_ERROR
)
+install(SCRIPT ${deploy_script})