Add a CMake option to use dynamic dispatch for dtQueryFilter in Detour. (#628)
This commit is contained in:
parent
32e5f94b11
commit
53f7818027
@ -13,6 +13,7 @@ option(RECASTNAVIGATION_DEMO "Build demo" ON)
|
||||
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)
|
||||
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
@ -37,6 +38,9 @@ set(PACKAGE_VERSION "${LIB_VERSION}")
|
||||
if(RECASTNAVIGATION_DT_POLYREF64)
|
||||
set(PKG_CONFIG_CFLAGS "${PKG_CONFIG_CFLAGS} -DDT_POLYREF64")
|
||||
endif()
|
||||
if(RECASTNAVIGATION_DT_VIRTUAL_QUERYFILTER)
|
||||
set(PKG_CONFIG_CFLAGS "${PKG_CONFIG_CFLAGS} -DDT_VIRTUAL_QUERYFILTER")
|
||||
endif()
|
||||
configure_file(
|
||||
"${RecastNavigation_SOURCE_DIR}/recastnavigation.pc.in"
|
||||
"${RecastNavigation_BINARY_DIR}/recastnavigation.pc"
|
||||
|
@ -9,6 +9,9 @@ set(Detour_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include")
|
||||
if(RECASTNAVIGATION_DT_POLYREF64)
|
||||
target_compile_definitions(Detour PUBLIC DT_POLYREF64)
|
||||
endif()
|
||||
if(RECASTNAVIGATION_DT_VIRTUAL_QUERYFILTER)
|
||||
target_compile_definitions(Detour PUBLIC DT_VIRTUAL_QUERYFILTER)
|
||||
endif()
|
||||
|
||||
target_include_directories(Detour PUBLIC
|
||||
"$<BUILD_INTERFACE:${Detour_INCLUDE_DIR}>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user