Files
XCEngine/CMakeLists.txt

52 lines
1.4 KiB
CMake

cmake_minimum_required(VERSION 3.15)
if(MSVC)
if(POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
endif()
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
"$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
endif()
project(XCEngine)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(XCENGINE_NANOVDB_INCLUDE_HINTS
"${CMAKE_SOURCE_DIR}/engine/third_party/nanovdb/include"
"$ENV{VCPKG_ROOT}/installed/x64-windows/include"
"D:/vcpkg/installed/x64-windows/include"
)
find_path(
XCENGINE_NANOVDB_INCLUDE_DIR
NAMES nanovdb/io/IO.h
HINTS ${XCENGINE_NANOVDB_INCLUDE_HINTS}
)
if(XCENGINE_NANOVDB_INCLUDE_DIR)
set(XCENGINE_HAS_NANOVDB ON)
message(STATUS "NanoVDB headers found: ${XCENGINE_NANOVDB_INCLUDE_DIR}")
else()
set(XCENGINE_HAS_NANOVDB OFF)
message(STATUS "NanoVDB headers not found; .nvdb source-file support will be disabled")
endif()
enable_testing()
option(XCENGINE_ENABLE_MONO_SCRIPTING "Build the Mono-based C# scripting runtime" ON)
option(XCENGINE_BUILD_XCUI_EDITOR_APP "Build the XCUI editor shell app" ON)
set(
XCENGINE_MONO_ROOT_DIR
"${CMAKE_SOURCE_DIR}/参考/Fermion/Fermion/external/mono"
CACHE PATH
"Path to the bundled Mono distribution used by the scripting runtime")
add_subdirectory(engine)
add_subdirectory(editor)
add_subdirectory(new_editor)
add_subdirectory(managed)
add_subdirectory(mvs/RenderDoc)
add_subdirectory(tests)