summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/mediaplayer
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2022-01-17 16:50:42 +0200
committerSamuli Piippo <samuli.piippo@qt.io>2022-01-18 17:26:57 +0200
commita0437e324bad99685072aa7f7a5fc4d20846bb12 (patch)
tree5e037a007416798ef6b34aaab2990189405b8d5f /examples/multimedia/video/mediaplayer
parent3b4471a90f1e03be03625050a571debddac5a7f3 (diff)
CMake: add install command for examples
Add install command to deploy the examples correctly. Pick-to: 6.3 6.2 Change-Id: If9c24c4267a801078a4bf3f783587afeeb734be0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/multimedia/video/mediaplayer')
-rw-r--r--examples/multimedia/video/mediaplayer/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/multimedia/video/mediaplayer/CMakeLists.txt b/examples/multimedia/video/mediaplayer/CMakeLists.txt
index ea64af3f4..8fa99ee9f 100644
--- a/examples/multimedia/video/mediaplayer/CMakeLists.txt
+++ b/examples/multimedia/video/mediaplayer/CMakeLists.txt
@@ -11,6 +11,12 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/mediaplayer")
+
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check https://doc.qt.io/qt/deployment-android.html for more information.
# They need to be set before the find_package(...) calls below.
@@ -43,3 +49,9 @@ target_compile_definitions(mediaplayer
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(mediaplayer
PRIVATE Qt6::Core Qt6::Quick Qt6::Svg)
+
+install(TARGETS mediaplayer
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)