diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e2a7ce..b7bd74f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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" diff --git a/Detour/CMakeLists.txt b/Detour/CMakeLists.txt index 910ec34..c8eb858 100644 --- a/Detour/CMakeLists.txt +++ b/Detour/CMakeLists.txt @@ -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 "$"