Skip to content

Commit 29e6c81

Browse files
Patch librealsense v2.44.0 to include <chrono> for system_clock (#7074)
* Patch librealsense v2.44.0 to include `<chrono>` for `system_clock` Fixes: C:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\src\backend.h(108,79): error C2039: 'system_clock': is not a member of 'std::chrono' And cascaded: C:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\src\backend.cpp(28,88): error C2039: 'system_clock': is not a member of 'std::chrono' C:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\src\mf\mf-backend.h(31,26): error C2039: 'high_resolution_clock': is not a member of 'std::chrono' C:\gitP\isl-org\Open3D\build_amd64\librealsense\src\ext_librealsense\src\mf\mf-backend.cpp(26,9): error C2512: 'std::chrono::time_point': no appropriate default constructor available ---------
1 parent baa9012 commit 29e6c81

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/src/backend.h b/src/backend.h
2+
index a402e3dfb..0acd299c0 100644
3+
--- a/src/backend.h
4+
+++ b/src/backend.h
5+
@@ -14,6 +14,7 @@
6+
7+
#include <memory> // For shared_ptr
8+
#include <functional> // For function
9+
+#include <chrono>
10+
#include <thread> // For this_thread::sleep_for
11+
#include <vector>
12+
#include <algorithm>

3rdparty/librealsense/librealsense.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ ExternalProject_Add(
2020
# Patch for macOS ARM64 support for versions < 2.50.0
2121
COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace
2222
${CMAKE_CURRENT_LIST_DIR}/fix-macos-arm64.patch
23+
# Patch to include the <chrono> header for the system_clock type
24+
COMMAND ${GIT_EXECUTABLE} apply --ignore-space-change --ignore-whitespace
25+
${CMAKE_CURRENT_LIST_DIR}/fix-include-chrono.patch
2326
CMAKE_ARGS
2427
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
2528
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
- Fix CMake configuration summary incorrectly reporting `no` for system BLAS. (PR #7230)
6262
- Add error handling for insufficient correspondences in AdvancedMatching (PR #7234)
6363
- Exposed `get_plotly_fig` and modified `draw_plotly` to return the `Figure` it creates. (PR #7258)
64+
- Fix build with librealsense v2.44.0 and upcoming VS 2022 17.13 (PR #7074)
6465

6566
## 0.13
6667

0 commit comments

Comments
 (0)