From 4a95dcd59140da05a0115a89defb0b39df1f343a Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Sun, 30 Mar 2025 15:30:14 -0400 Subject: [PATCH] CMake: Set the C++ standard version per-target rather than globally Also clean up the CMakeLists.txt files a bit --- CMakeLists.txt | 27 +++++++++----------- DebugUtils/CMakeLists.txt | 46 ++++++++++++++++------------------ Detour/CMakeLists.txt | 44 +++++++++++++++++--------------- DetourCrowd/CMakeLists.txt | 42 +++++++++++++++---------------- DetourTileCache/CMakeLists.txt | 45 ++++++++++++++++----------------- Recast/CMakeLists.txt | 41 +++++++++++++++--------------- RecastDemo/CMakeLists.txt | 26 +++++++++++-------- Tests/CMakeLists.txt | 6 ++++- 8 files changed, 142 insertions(+), 135 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 813a36b6..596aa9cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,12 +3,10 @@ cmake_minimum_required(VERSION 3.1) project(RecastNavigation) # lib versions -SET(SOVERSION 1) +set(SOVERSION 1) set(LIB_VERSION 1.6.0) string(REPLACE "." "," LIB_VERSION_NUM "${LIB_VERSION}.0") -set_property(GLOBAL PROPERTY CXX_STANDARD 98) - option(RECASTNAVIGATION_DEMO "Build demo" ON) option(RECASTNAVIGATION_TESTS "Build tests" ON) option(RECASTNAVIGATION_EXAMPLES "Build examples" ON) @@ -16,7 +14,7 @@ option(RECASTNAVIGATION_DT_POLYREF64 "Use 64bit polyrefs instead of 32bit for De 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" "$,ON,OFF>") -if(MSVC AND BUILD_SHARED_LIBS) +if (MSVC AND BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() @@ -26,8 +24,7 @@ include(GNUInstallDirs) configure_file( "${RecastNavigation_SOURCE_DIR}/version.h.in" "${RecastNavigation_BINARY_DIR}/version.h") -install(FILES "${RecastNavigation_BINARY_DIR}/version.h" DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) +install(FILES "${RecastNavigation_BINARY_DIR}/version.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) # Needed for recastnavigation.pc.in set(prefix ${CMAKE_INSTALL_PREFIX}) @@ -36,18 +33,18 @@ set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}") set(bindir "${CMAKE_INSTALL_FULL_BINDIR}") set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}") set(PACKAGE_VERSION "${LIB_VERSION}") -if(RECASTNAVIGATION_DT_POLYREF64) +if (RECASTNAVIGATION_DT_POLYREF64) set(PKG_CONFIG_CFLAGS "${PKG_CONFIG_CFLAGS} -DDT_POLYREF64") endif() -if(RECASTNAVIGATION_DT_VIRTUAL_QUERYFILTER) +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" - @ONLY) -install(FILES "${RecastNavigation_BINARY_DIR}/recastnavigation.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + "${RecastNavigation_SOURCE_DIR}/recastnavigation.pc.in" + "${RecastNavigation_BINARY_DIR}/recastnavigation.pc" + @ONLY +) +install(FILES "${RecastNavigation_BINARY_DIR}/recastnavigation.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") add_subdirectory(DebugUtils) add_subdirectory(Detour) @@ -89,9 +86,9 @@ install( if (RECASTNAVIGATION_DEMO) add_subdirectory(RecastDemo) -endif () +endif() if (RECASTNAVIGATION_TESTS) enable_testing() add_subdirectory(Tests) -endif () +endif() diff --git a/DebugUtils/CMakeLists.txt b/DebugUtils/CMakeLists.txt index a3cd7995..3299b168 100644 --- a/DebugUtils/CMakeLists.txt +++ b/DebugUtils/CMakeLists.txt @@ -1,39 +1,37 @@ file(GLOB SOURCES Source/*.cpp) add_library(DebugUtils ${SOURCES}) - add_library(RecastNavigation::DebugUtils ALIAS DebugUtils) -set_target_properties(DebugUtils PROPERTIES DEBUG_POSTFIX -d) +set_target_properties(DebugUtils PROPERTIES + DEBUG_POSTFIX -d + SOVERSION ${SOVERSION} + VERSION ${LIB_VERSION} + COMPILE_PDB_OUTPUT_DIRECTORY . + COMPILE_PDB_NAME "DebugUtils-d" + CXX_STANDARD 98 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF # Disable compiler-specific extensions +) + +# Set include path set(DebugUtils_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") - target_include_directories(DebugUtils PUBLIC "$" ) -target_link_libraries(DebugUtils - Recast - Detour - DetourTileCache -) - -set_target_properties(DebugUtils PROPERTIES - SOVERSION ${SOVERSION} - VERSION ${LIB_VERSION} - COMPILE_PDB_OUTPUT_DIRECTORY . - COMPILE_PDB_NAME "DebugUtils-d" - ) +# Set linkages +target_link_libraries(DebugUtils Recast Detour DetourTileCache) install(TARGETS DebugUtils - EXPORT recastnavigation-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation - ) + EXPORT recastnavigation-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation +) file(GLOB INCLUDES Include/*.h) -install(FILES ${INCLUDES} DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) -if(MSVC) +install(FILES ${INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) +if (MSVC) install(FILES "$/DebugUtils-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib" OPTIONAL) endif() diff --git a/Detour/CMakeLists.txt b/Detour/CMakeLists.txt index 023cc5aa..176ce38c 100644 --- a/Detour/CMakeLists.txt +++ b/Detour/CMakeLists.txt @@ -2,43 +2,47 @@ file(GLOB SOURCES Source/*.cpp) add_library(Detour ${SOURCES}) add_library(RecastNavigation::Detour ALIAS Detour) -set_target_properties(Detour PROPERTIES DEBUG_POSTFIX -d) +set_target_properties(Detour PROPERTIES + DEBUG_POSTFIX -d + SOVERSION ${SOVERSION} + VERSION ${LIB_VERSION} + COMPILE_PDB_OUTPUT_DIRECTORY . + COMPILE_PDB_NAME "Detour-d" + CXX_STANDARD 98 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF # Disable compiler-specific extensions +) -set(Detour_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") - -if(RECASTNAVIGATION_DT_POLYREF64) +# Set build options +if (RECASTNAVIGATION_DT_POLYREF64) target_compile_definitions(Detour PUBLIC DT_POLYREF64) endif() -if(RECASTNAVIGATION_DT_VIRTUAL_QUERYFILTER) + +if (RECASTNAVIGATION_DT_VIRTUAL_QUERYFILTER) target_compile_definitions(Detour PUBLIC DT_VIRTUAL_QUERYFILTER) endif() -if(NOT RECASTNAVIGATION_ENABLE_ASSERTS) +if (NOT RECASTNAVIGATION_ENABLE_ASSERTS) target_compile_definitions(Detour PUBLIC RC_DISABLE_ASSERTS) endif() +# Set include path +set(Detour_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") target_include_directories(Detour PUBLIC "$" ) -set_target_properties(Detour PROPERTIES - SOVERSION ${SOVERSION} - VERSION ${LIB_VERSION} - COMPILE_PDB_OUTPUT_DIRECTORY . - COMPILE_PDB_NAME "Detour-d" - ) - install(TARGETS Detour - EXPORT recastnavigation-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation - ) + EXPORT recastnavigation-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation +) file(GLOB INCLUDES Include/*.h) install(FILES ${INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) -if(MSVC) +if (MSVC) install(FILES "$/Detour-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib" OPTIONAL) endif() diff --git a/DetourCrowd/CMakeLists.txt b/DetourCrowd/CMakeLists.txt index 214cb4ce..1865bb03 100644 --- a/DetourCrowd/CMakeLists.txt +++ b/DetourCrowd/CMakeLists.txt @@ -2,36 +2,36 @@ file(GLOB SOURCES Source/*.cpp) add_library(DetourCrowd ${SOURCES}) add_library(RecastNavigation::DetourCrowd ALIAS DetourCrowd) -set_target_properties(DetourCrowd PROPERTIES DEBUG_POSTFIX -d) +set_target_properties(DetourCrowd PROPERTIES + DEBUG_POSTFIX -d + SOVERSION ${SOVERSION} + VERSION ${LIB_VERSION} + COMPILE_PDB_OUTPUT_DIRECTORY . + COMPILE_PDB_NAME "DetourCrowd-d" + CXX_STANDARD 98 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF # Disable compiler-specific extensions +) +# Set include path set(DetourCrowd_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") - target_include_directories(DetourCrowd PUBLIC "$" ) -target_link_libraries(DetourCrowd - Detour -) - -set_target_properties(DetourCrowd PROPERTIES - SOVERSION ${SOVERSION} - VERSION ${LIB_VERSION} - COMPILE_PDB_OUTPUT_DIRECTORY . - COMPILE_PDB_NAME "DetourCrowd-d" - ) +# Set linkages +target_link_libraries(DetourCrowd Detour) install(TARGETS DetourCrowd - EXPORT recastnavigation-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation - ) + EXPORT recastnavigation-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation +) file(GLOB INCLUDES Include/*.h) -install(FILES ${INCLUDES} DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) -if(MSVC) +install(FILES ${INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) +if (MSVC) install(FILES "$/DetourCrowd-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib" OPTIONAL) endif() diff --git a/DetourTileCache/CMakeLists.txt b/DetourTileCache/CMakeLists.txt index e9cd3ed8..d804c9bd 100644 --- a/DetourTileCache/CMakeLists.txt +++ b/DetourTileCache/CMakeLists.txt @@ -1,38 +1,37 @@ file(GLOB SOURCES Source/*.cpp) add_library(DetourTileCache ${SOURCES}) - add_library(RecastNavigation::DetourTileCache ALIAS DetourTileCache) -set_target_properties(DetourTileCache PROPERTIES DEBUG_POSTFIX -d) +set_target_properties(DetourTileCache PROPERTIES + DEBUG_POSTFIX -d + SOVERSION ${SOVERSION} + VERSION ${LIB_VERSION} + COMPILE_PDB_OUTPUT_DIRECTORY . + COMPILE_PDB_NAME "DetourTileCache-d" + CXX_STANDARD 98 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF # Disable compiler-specific extensions +) + +# Set include path set(DetourTileCache_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") - target_include_directories(DetourTileCache PUBLIC "$" ) -target_link_libraries(DetourTileCache - Detour -) - -set_target_properties(DetourTileCache PROPERTIES - SOVERSION ${SOVERSION} - VERSION ${LIB_VERSION} - COMPILE_PDB_OUTPUT_DIRECTORY . - COMPILE_PDB_NAME "DetourTileCache-d" - ) - +# Set linkages +target_link_libraries(DetourTileCache Detour) install(TARGETS DetourTileCache - EXPORT recastnavigation-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation - ) + EXPORT recastnavigation-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation +) file(GLOB INCLUDES Include/*.h) -install(FILES ${INCLUDES} DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) -if(MSVC) +install(FILES ${INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) +if (MSVC) install(FILES "$/DetourTileCache-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib" OPTIONAL) endif() diff --git a/Recast/CMakeLists.txt b/Recast/CMakeLists.txt index e23a97cd..26b5d825 100644 --- a/Recast/CMakeLists.txt +++ b/Recast/CMakeLists.txt @@ -1,37 +1,38 @@ file(GLOB SOURCES Source/*.cpp) add_library(Recast ${SOURCES}) - add_library(RecastNavigation::Recast ALIAS Recast) -set_target_properties(Recast PROPERTIES DEBUG_POSTFIX -d) +set_target_properties(Recast PROPERTIES + DEBUG_POSTFIX -d + SOVERSION ${SOVERSION} + VERSION ${LIB_VERSION} + COMPILE_PDB_OUTPUT_DIRECTORY . + COMPILE_PDB_NAME "Recast-d" + CXX_STANDARD 98 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF # Disable compiler-specific extensions +) + +# Set include path set(Recast_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") - target_include_directories(Recast PUBLIC "$" ) -if(NOT RECASTNAVIGATION_ENABLE_ASSERTS) +if (NOT RECASTNAVIGATION_ENABLE_ASSERTS) target_compile_definitions(Recast PUBLIC RC_DISABLE_ASSERTS) endif() -set_target_properties(Recast PROPERTIES - SOVERSION ${SOVERSION} - VERSION ${LIB_VERSION} - COMPILE_PDB_OUTPUT_DIRECTORY . - COMPILE_PDB_NAME "Recast-d" - ) - install(TARGETS Recast - EXPORT recastnavigation-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation - ) + EXPORT recastnavigation-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation +) file(GLOB INCLUDES Include/*.h) -install(FILES ${INCLUDES} DESTINATION - ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) -if(MSVC) +install(FILES ${INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) +if (MSVC) install(FILES "$/Recast-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib" OPTIONAL) endif() diff --git a/RecastDemo/CMakeLists.txt b/RecastDemo/CMakeLists.txt index 1e8f9398..720a0d99 100644 --- a/RecastDemo/CMakeLists.txt +++ b/RecastDemo/CMakeLists.txt @@ -2,8 +2,8 @@ file(GLOB SOURCES Source/*.cpp Contrib/fastlz/fastlz.c) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -if(NOT SDL2_ROOT_DIR) - if(WIN32) +if (NOT SDL2_ROOT_DIR) + if (WIN32) set(SDL2_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Contrib/SDL") elseif(APPLE) set(SDL2_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Bin") @@ -11,7 +11,7 @@ if(NOT SDL2_ROOT_DIR) endif() find_package(OpenGL REQUIRED) -if(APPLE) +if (APPLE) find_library(SDL2_LIBRARY NAMES SDL2 PATHS ${SDL2_ROOT_DIR} @@ -30,20 +30,26 @@ include_directories(../DetourTileCache/Include) include_directories(../Recast/Include) include_directories(Include) include_directories(Contrib/SDL/include) -if(APPLE) +if (APPLE) include_directories(${SDL2_LIBRARY}/Headers) endif() if (WIN32) add_executable(RecastDemo WIN32 ${SOURCES}) -elseif(APPLE) +elseif (APPLE) add_executable(RecastDemo MACOSX_BUNDLE ${SOURCES}) else() add_executable(RecastDemo ${SOURCES}) endif() -if( WIN32 ) - if ( "${CMAKE_MAKE_PROGRAM}" MATCHES "MSBuild" ) +set_target_properties(RecastDemo PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF # Disable compiler-specific extensions +) + +if (WIN32) + if ("${CMAKE_MAKE_PROGRAM}" MATCHES "MSBuild") add_custom_command(TARGET RecastDemo POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${SDL2_RUNTIME_LIBRARY}" ${CMAKE_BINARY_DIR}/RecastDemo/$(ConfigurationName)/ @@ -51,7 +57,7 @@ if( WIN32 ) COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Bin/TestCases ${CMAKE_BINARY_DIR}/RecastDemo/$(ConfigurationName)/TestCases COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Bin/DroidSans.ttf ${CMAKE_BINARY_DIR}/RecastDemo/$(ConfigurationName)/ ) - elseif ( MINGW ) + elseif (MINGW) add_custom_command(TARGET RecastDemo POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${SDL2_RUNTIME_LIBRARY}" ${CMAKE_BINARY_DIR}/RecastDemo/ @@ -66,15 +72,13 @@ else() file(COPY Bin/DroidSans.ttf DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) endif() - add_dependencies(RecastDemo DebugUtils Detour DetourCrowd DetourTileCache Recast) -if(APPLE) +if (APPLE) target_link_libraries(RecastDemo ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} DebugUtils Detour DetourCrowd DetourTileCache Recast) else() target_link_libraries(RecastDemo ${OPENGL_LIBRARIES} SDL2::SDL2main DebugUtils Detour DetourCrowd DetourTileCache Recast) endif() - install(TARGETS RecastDemo RUNTIME DESTINATION bin BUNDLE DESTINATION bin) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c37a6c9c..c0ea3c3e 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -10,7 +10,11 @@ add_executable(Tests DetourCrowd/Tests_DetourPathCorridor.cpp ) -set_property(TARGET Tests PROPERTY CXX_STANDARD 17) +set_target_properties(Tests PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF # Disable compiler-specific extensions +) add_dependencies(Tests Recast Detour DetourCrowd) target_link_libraries(Tests Recast Detour DetourCrowd)