# Minimal RecastNavigation build for editScene
# No demos, no tests, no -fno-rtti / -fno-exceptions

cmake_minimum_required(VERSION 3.13)
project(recastnavigation-editscene LANGUAGES C CXX)

# Version info for the libraries
set(SOVERSION 1)
set(LIB_VERSION 1.6.0)

# We want RTTI and exceptions to be compatible with the rest of the C++ project.
# The upstream CMakeLists adds -fno-rtti -fno-exceptions; we skip that here.

# Disable unwanted parts
set(RECASTNAVIGATION_DEMO OFF CACHE BOOL "" FORCE)
set(RECASTNAVIGATION_TESTS OFF CACHE BOOL "" FORCE)
set(RECASTNAVIGATION_EXAMPLES OFF CACHE BOOL "" FORCE)
set(RECASTNAVIGATION_ENABLE_ASSERTS "$<CONFIG:Debug>" CACHE STRING "" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "" FORCE)


# Build the core libraries only
add_subdirectory(Recast EXCLUDE_FROM_ALL)
add_subdirectory(Detour EXCLUDE_FROM_ALL)
add_subdirectory(DetourTileCache EXCLUDE_FROM_ALL)
add_subdirectory(DetourCrowd EXCLUDE_FROM_ALL)
add_subdirectory(DebugUtils EXCLUDE_FROM_ALL)
