diff options
Diffstat (limited to 'examples/corelib/serialization/savegame/CMakeLists.txt')
-rw-r--r-- | examples/corelib/serialization/savegame/CMakeLists.txt | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/examples/corelib/serialization/savegame/CMakeLists.txt b/examples/corelib/serialization/savegame/CMakeLists.txt index 10851d55fd..14621ccc23 100644 --- a/examples/corelib/serialization/savegame/CMakeLists.txt +++ b/examples/corelib/serialization/savegame/CMakeLists.txt @@ -1,30 +1,37 @@ -# Generated from savegame.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -cmake_minimum_required(VERSION 3.14) +cmake_minimum_required(VERSION 3.16) project(savegame LANGUAGES CXX) -set(CMAKE_INCLUDE_CURRENT_DIR ON) +if (ANDROID) + message(FATAL_ERROR "This project cannot be built on Android.") +endif() -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) +find_package(Qt6 REQUIRED COMPONENTS Core) -set(INSTALL_EXAMPLEDIR "examples/corelib/serialization/savegame") +qt_standard_project_setup() -find_package(Qt6 COMPONENTS Core) - -add_executable(savegame +qt_add_executable(savegame character.cpp character.h game.cpp game.h level.cpp level.h main.cpp ) -target_link_libraries(savegame PUBLIC - Qt::Core + +target_link_libraries(savegame PRIVATE + Qt6::Core ) install(TARGETS savegame - 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 savegame + OUTPUT_SCRIPT deploy_script + NO_UNSUPPORTED_PLATFORM_ERROR ) +install(SCRIPT ${deploy_script}) |