aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/scenegraph/d3d11underqml/CMakeLists.txt')
-rw-r--r--examples/quick/scenegraph/d3d11underqml/CMakeLists.txt31
1 files changed, 17 insertions, 14 deletions
diff --git a/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt b/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt
index 2a08c39d59..dec029d8da 100644
--- a/examples/quick/scenegraph/d3d11underqml/CMakeLists.txt
+++ b/examples/quick/scenegraph/d3d11underqml/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(d3d11underqml LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/scenegraph/d3d11underqml")
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
qt_add_executable(d3d11underqml
@@ -25,10 +19,10 @@ set_target_properties(d3d11underqml PROPERTIES
)
target_link_libraries(d3d11underqml PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
d3d11
d3dcompiler
)
@@ -45,7 +39,16 @@ qt_add_qml_module(d3d11underqml
)
install(TARGETS d3d11underqml
- 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 d3d11underqml
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})