forked from NauEngine/NauEditorPublic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (45 loc) · 1.51 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
cmake_minimum_required(VERSION 3.13)
if(POLICY CMP0079)
cmake_policy(SET CMP0079 NEW)
endif()
if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD ON)
set(QT_VERSION 6)
set(CMAKE_CXX_STANDARD 20)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
project(NauEditor)
if(NOT DEFINED ${NauEditorFolder})
set(NauEditorFolder "NauEditor")
endif(NOT DEFINED ${NauEditorFolder})
# In multi-configuration IDEs, only allow Debug and Release
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Build Configurations" FORCE)
endif()
if(NOT DEFINED NAU_ROOT_DIR)
set(NAU_ROOT_DIR "$ENV{NAU_ENGINE_SOURCE_DIR}")
endif()
cmake_path(SET NAU_ROOT_DIR NORMALIZE "${NAU_ROOT_DIR}")
set(NAU_CORE_TESTS OFF)
# Shaders are assembled in samples, so we temporarily include them in the assembly.
# TODO: Remove them from the assembly when shader generation is transferred to engine modules
set(NAU_CORE_SAMPLES ON)
set(NAU_CORE_TOOLS ON)
set(CMAKE_MODULE_PATH
"${NAU_ROOT_DIR}/cmake"
"${CMAKE_SOURCE_DIR}/cmake/defaults"
"${CMAKE_SOURCE_DIR}/cmake/macros"
)
add_subdirectory("${NAU_ROOT_DIR}" "NauEngine")
include(defaults/UsdPackages)
include(NauCommon)
include(NauModule)
include(NauGenFunctions)
include(platformSpec/NauPlatformSetup)
include(Packages)
add_subdirectory(editor)
add_subdirectory(installer)
add_subdirectory(translations)