diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2024-01-02 10:09:00 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-01-10 03:12:20 +0000 |
commit | 4b11923f3feb85b0fb9f58fa961adf576c571c53 (patch) | |
tree | dd03cfbcdde686918fe71da7bae477730a1c1610 | |
parent | d221cf868f1a961d1de57b9acc2bb2a8c7922d89 (diff) |
cmake: fix virtual assistant examples build
Make Qt Virtual Assistant example build behave as all the other examples:
- minimum CMake required is the common 3.16
- install files to common examples path
Change-Id: I14a43a235ca2938df52c56b1fb5322a27be7e106
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 69daf0032fb22ebaceac507d5799754b6f5d421b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 70ed32a6ee212f33242299cb7630ea56b64d9977)
-rw-r--r-- | examples/quick3d/virtualassistant/CMakeLists.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/quick3d/virtualassistant/CMakeLists.txt b/examples/quick3d/virtualassistant/CMakeLists.txt index 89453396..2f6ddc34 100644 --- a/examples/quick3d/virtualassistant/CMakeLists.txt +++ b/examples/quick3d/virtualassistant/CMakeLists.txt @@ -1,13 +1,19 @@ # Copyright (C) 2023 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -cmake_minimum_required(VERSION 3.21.1) +cmake_minimum_required(VERSION 3.16) project(QtVirtualAssistant LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) +if(NOT DEFINED INSTALL_EXAMPLESDIR) + set(INSTALL_EXAMPLESDIR "examples") +endif() + +set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick3d/virtualassistant") + find_package(Qt6 6.5 REQUIRED COMPONENTS Core Gui Qml Quick) qt_standard_project_setup(REQUIRES 6.5) @@ -29,10 +35,9 @@ target_link_libraries(QtVirtualAssistant PRIVATE include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) -include(GNUInstallDirs) install(TARGETS QtVirtualAssistant - BUNDLE DESTINATION . - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) |