Skip to content

Commit 4b3fbf4

Browse files
committed
fix build with fmt-v11
1 parent dbb3c7d commit 4b3fbf4

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

3rdparty/find_dependencies.cmake

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ function(open3d_pkg_config_3rdparty_library name)
224224
target_compile_definitions(${name} INTERFACE ${CMAKE_MATCH_1})
225225
endif()
226226
endforeach()
227+
if (pc_${name}_LDFLAGS)
228+
target_link_options(${name} INTERFACE ${pc_${name}_LDFLAGS})
229+
endif()
227230
if(NOT BUILD_SHARED_LIBS OR arg_PUBLIC)
228231
install(TARGETS ${name} EXPORT ${PROJECT_NAME}Targets)
229232
endif()
@@ -767,9 +770,8 @@ endif()
767770

768771
# jsoncpp
769772
if(USE_SYSTEM_JSONCPP)
770-
open3d_find_package_3rdparty_library(3rdparty_jsoncpp
771-
PACKAGE jsoncpp
772-
TARGETS jsoncpp_lib
773+
open3d_pkg_config_3rdparty_library(3rdparty_jsoncpp
774+
SEARCH_ARGS jsoncpp
773775
)
774776
if(NOT 3rdparty_jsoncpp_FOUND)
775777
set(USE_SYSTEM_JSONCPP OFF)
@@ -790,9 +792,8 @@ endif()
790792

791793
# liblzf
792794
if(USE_SYSTEM_LIBLZF)
793-
open3d_find_package_3rdparty_library(3rdparty_liblzf
794-
PACKAGE liblzf
795-
TARGETS liblzf::liblzf
795+
open3d_pkg_config_3rdparty_library(3rdparty_liblzf
796+
SEARCH_ARGS liblzf
796797
)
797798
if(NOT 3rdparty_liblzf_FOUND)
798799
set(USE_SYSTEM_LIBLZF OFF)

cpp/open3d/io/file_format/FilePCD.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
// SPDX-License-Identifier: MIT
66
// ----------------------------------------------------------------------------
77

8-
#include <liblzf/lzf.h>
8+
extern "C" {
9+
#include <lzf.h>
10+
}
911

1012
#include <cstdint>
1113
#include <cstdio>

cpp/open3d/t/geometry/RaycastingScene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ namespace fmt {
11791179
template <>
11801180
struct formatter<RTCError> {
11811181
template <typename FormatContext>
1182-
auto format(const RTCError& c, FormatContext& ctx) {
1182+
auto format(const RTCError& c, FormatContext& ctx) const {
11831183
const char* name = rtcGetErrorString(c);
11841184
return format_to(ctx.out(), name);
11851185
}

cpp/open3d/t/io/file_format/FilePCD.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
// SPDX-License-Identifier: MIT
66
// ----------------------------------------------------------------------------
77

8-
#include <liblzf/lzf.h>
8+
extern "C" {
9+
#include <lzf.h>
10+
}
911

1012
#include <cinttypes>
1113
#include <cstdint>

cpp/open3d/utility/IJsonConvertible.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ namespace fmt {
8686
template <>
8787
struct formatter<Json::Value> {
8888
template <typename FormatContext>
89-
auto format(const Json::Value &value, FormatContext &ctx)
90-
-> decltype(ctx.out()) {
89+
auto format(const Json::Value &value, FormatContext &ctx) const -> decltype(ctx.out()) {
9190
return format_to(ctx.out(), "{}", open3d::utility::JsonToString(value));
9291
}
9392

cpp/open3d/visualization/rendering/RendererHandle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ struct formatter<
164164
char>> {
165165
template <typename FormatContext>
166166
auto format(const open3d::visualization::rendering::REHandle_abstract& uid,
167-
FormatContext& ctx) -> decltype(ctx.out()) {
167+
FormatContext& ctx) const -> decltype(ctx.out()) {
168168
return format_to(ctx.out(), "[{}, {}, hash: {}]",
169169
open3d::visualization::rendering::REHandle_abstract::
170170
TypeToString(uid.type),

cpp/pybind/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ endif()
103103
# Include additional libraries that may be absent from the user system
104104
# eg: libc++.so, libc++abi.so (needed by filament) for Linux.
105105
# libc++.so is a linker script including libc++.so.1 and libc++abi.so, so append 1 to libc++.so
106-
set(PYTHON_EXTRA_LIBRARIES $<TARGET_FILE:tbb>)
106+
set(PYTHON_EXTRA_LIBRARIES $<TARGET_FILE:TBB::tbb>)
107107
if (BUILD_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
108108
list(APPEND PYTHON_EXTRA_LIBRARIES ${CPP_LIBRARY}.1 ${CPPABI_LIBRARY})
109109
endif()

0 commit comments

Comments
 (0)