From 488e088f1d8a5317a53b0be4b97a1a7621899c91 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 17 Jan 2022 16:50:42 +0200 Subject: CMake: add install command for examples Add install command to deploy the examples correctly. Change-Id: If9c24c4267a801078a4bf3f783587afeeb734be0 Reviewed-by: Lars Knoll (cherry picked from commit a0437e324bad99685072aa7f7a5fc4d20846bb12) --- examples/multimedia/video/recorder/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'examples/multimedia/video/recorder/CMakeLists.txt') diff --git a/examples/multimedia/video/recorder/CMakeLists.txt b/examples/multimedia/video/recorder/CMakeLists.txt index a0067cd11..5b213fe30 100644 --- a/examples/multimedia/video/recorder/CMakeLists.txt +++ b/examples/multimedia/video/recorder/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/recorder") + find_package(QT NAMES Qt6 COMPONENTS Core Quick Multimedia REQUIRED) find_package(Qt6 COMPONENTS Core Quick Multimedia REQUIRED) @@ -43,3 +49,9 @@ if(APPLE AND NOT IOS) ) endif() endif() + +install(TARGETS recorder + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) -- cgit v1.2.3