| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
cmake_minimum_required(VERSION 3.16) |
| 5 |
project(scene3d LANGUAGES CXX) |
| 6 |
|
| 7 |
set(CMAKE_AUTOMOC ON) |
| 8 |
|
| 9 |
find_package(Qt6 REQUIRED COMPONENTS 3DInput 3DRender Core Gui Qml Quick) |
| 10 |
|
| 11 |
qt_add_executable(scene3d |
| 12 |
main.cpp |
| 13 |
) |
| 14 |
|
| 15 |
set_target_properties(scene3d PROPERTIES |
| 16 |
WIN32_EXECUTABLE TRUE |
| 17 |
MACOSX_BUNDLE TRUE |
| 18 |
) |
| 19 |
|
| 20 |
target_link_libraries(scene3d PUBLIC |
| 21 |
Qt::3DInput |
| 22 |
Qt::3DRender |
| 23 |
Qt::Core |
| 24 |
Qt::Gui |
| 25 |
Qt::Qml |
| 26 |
Qt::Quick |
| 27 |
) |
| 28 |
|
| 29 |
# Resources: |
| 30 |
set(scene3d_resource_files |
| 31 |
"AnimatedEntity.qml" |
| 32 |
"main.qml" |
| 33 |
) |
| 34 |
|
| 35 |
qt6_add_resources(scene3d "scene3dres" |
| 36 |
PREFIX |
| 37 |
"/" |
| 38 |
FILES |
| 39 |
${scene3d_resource_files} |
| 40 |
) |
| 41 |
|
| 42 |
target_sources(scene3d PRIVATE ${scene3d_resource_files}) |