Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ option(RECASTNAVIGATION_TESTS "Build tests" ON)
option(RECASTNAVIGATION_EXAMPLES "Build examples" ON)
option(RECASTNAVIGATION_DT_POLYREF64 "Use 64bit polyrefs instead of 32bit for Detour" OFF)
option(RECASTNAVIGATION_DT_VIRTUAL_QUERYFILTER "Use dynamic dispatch for dtQueryFilter in Detour to allow for custom filters" OFF)
option(RECASTNAVIGATION_ENABLE_ASSERTS "Enable custom recastnavigation asserts" "$<IF:$<CONFIG:Debug>,ON,OFF>")
set(RECASTNAVIGATION_ENABLE_ASSERTS "$<CONFIG:Debug>" CACHE STRING "Condition to enable custom recastnavigation asserts, evaluated as generator expression")
option(RECASTNAVIGATION_ENABLE_FAST_MATH "Enable faster math calculations." OFF)

# dll export
Expand Down Expand Up @@ -62,9 +62,6 @@ if(NOT MSVC)
add_compile_options(-g)
endif()

# Release optimizations and disable asserts
add_compile_definitions($<$<NOT:$<CONFIG:Debug>>:RC_DISABLE_ASSERTS>)

configure_file(
"${RecastNavigation_SOURCE_DIR}/version.h.in"
"${RecastNavigation_BINARY_DIR}/version.h")
Expand Down
4 changes: 1 addition & 3 deletions Detour/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ if (RECASTNAVIGATION_DT_VIRTUAL_QUERYFILTER)
target_compile_definitions(Detour PUBLIC DT_VIRTUAL_QUERYFILTER)
endif()

if (NOT RECASTNAVIGATION_ENABLE_ASSERTS)
target_compile_definitions(Detour PUBLIC RC_DISABLE_ASSERTS)
endif()
target_compile_definitions(Detour PUBLIC "$<$<NOT:${RECASTNAVIGATION_ENABLE_ASSERTS}>:RC_DISABLE_ASSERTS>")

# Set include path
set(Detour_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
Expand Down
4 changes: 1 addition & 3 deletions Recast/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ target_include_directories(Recast PUBLIC
"$<BUILD_INTERFACE:${Recast_INCLUDE_DIR}>"
)

if (NOT RECASTNAVIGATION_ENABLE_ASSERTS)
target_compile_definitions(Recast PUBLIC RC_DISABLE_ASSERTS)
endif()
target_compile_definitions(Recast PUBLIC "$<$<NOT:${RECASTNAVIGATION_ENABLE_ASSERTS}>:RC_DISABLE_ASSERTS>")

install(TARGETS Recast
EXPORT recastnavigation-targets
Expand Down