diff --git a/3rdparty/librealsense/fix-include-chrono.patch b/3rdparty/librealsense/fix-include-chrono.patch new file mode 100644 index 00000000000..fe3ea80b784 --- /dev/null +++ b/3rdparty/librealsense/fix-include-chrono.patch @@ -0,0 +1,12 @@ +diff --git a/src/backend.h b/src/backend.h +index a402e3dfb..0acd299c0 100644 +--- a/src/backend.h ++++ b/src/backend.h +@@ -14,6 +14,7 @@ + + #include // For shared_ptr + #include // For function ++#include + #include // For this_thread::sleep_for + #include + #include diff --git a/3rdparty/librealsense/librealsense.cmake b/3rdparty/librealsense/librealsense.cmake index e5caa700df7..8c4e98b57e6 100644 --- a/3rdparty/librealsense/librealsense.cmake +++ b/3rdparty/librealsense/librealsense.cmake @@ -20,6 +20,9 @@ ExternalProject_Add( # Patch for macOS ARM64 support for versions < 2.50.0 COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace ${CMAKE_CURRENT_LIST_DIR}/fix-macos-arm64.patch + # Patch to include the header for the system_clock type + COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace + ${CMAKE_CURRENT_LIST_DIR}/fix-include-chrono.patch CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= -DBUILD_SHARED_LIBS=OFF