Skip to content

Commit

Permalink
fix build with fmt-v11
Browse files Browse the repository at this point in the history
  • Loading branch information
daizhirui committed Sep 15, 2024
1 parent dbb3c7d commit 4b3fbf4
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
13 changes: 7 additions & 6 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ function(open3d_pkg_config_3rdparty_library name)
target_compile_definitions(${name} INTERFACE ${CMAKE_MATCH_1})
endif()
endforeach()
if (pc_${name}_LDFLAGS)
target_link_options(${name} INTERFACE ${pc_${name}_LDFLAGS})
endif()
if(NOT BUILD_SHARED_LIBS OR arg_PUBLIC)
install(TARGETS ${name} EXPORT ${PROJECT_NAME}Targets)
endif()
Expand Down Expand Up @@ -767,9 +770,8 @@ endif()

# jsoncpp
if(USE_SYSTEM_JSONCPP)
open3d_find_package_3rdparty_library(3rdparty_jsoncpp
PACKAGE jsoncpp
TARGETS jsoncpp_lib
open3d_pkg_config_3rdparty_library(3rdparty_jsoncpp
SEARCH_ARGS jsoncpp
)
if(NOT 3rdparty_jsoncpp_FOUND)
set(USE_SYSTEM_JSONCPP OFF)
Expand All @@ -790,9 +792,8 @@ endif()

# liblzf
if(USE_SYSTEM_LIBLZF)
open3d_find_package_3rdparty_library(3rdparty_liblzf
PACKAGE liblzf
TARGETS liblzf::liblzf
open3d_pkg_config_3rdparty_library(3rdparty_liblzf
SEARCH_ARGS liblzf
)
if(NOT 3rdparty_liblzf_FOUND)
set(USE_SYSTEM_LIBLZF OFF)
Expand Down
4 changes: 3 additions & 1 deletion cpp/open3d/io/file_format/FilePCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
// SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------

#include <liblzf/lzf.h>
extern "C" {
#include <lzf.h>
}

#include <cstdint>
#include <cstdio>
Expand Down
2 changes: 1 addition & 1 deletion cpp/open3d/t/geometry/RaycastingScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ namespace fmt {
template <>
struct formatter<RTCError> {
template <typename FormatContext>
auto format(const RTCError& c, FormatContext& ctx) {
auto format(const RTCError& c, FormatContext& ctx) const {
const char* name = rtcGetErrorString(c);
return format_to(ctx.out(), name);
}
Expand Down
4 changes: 3 additions & 1 deletion cpp/open3d/t/io/file_format/FilePCD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
// SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------

#include <liblzf/lzf.h>
extern "C" {
#include <lzf.h>
}

#include <cinttypes>
#include <cstdint>
Expand Down
3 changes: 1 addition & 2 deletions cpp/open3d/utility/IJsonConvertible.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ namespace fmt {
template <>
struct formatter<Json::Value> {
template <typename FormatContext>
auto format(const Json::Value &value, FormatContext &ctx)
-> decltype(ctx.out()) {
auto format(const Json::Value &value, FormatContext &ctx) const -> decltype(ctx.out()) {
return format_to(ctx.out(), "{}", open3d::utility::JsonToString(value));
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/open3d/visualization/rendering/RendererHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ struct formatter<
char>> {
template <typename FormatContext>
auto format(const open3d::visualization::rendering::REHandle_abstract& uid,
FormatContext& ctx) -> decltype(ctx.out()) {
FormatContext& ctx) const -> decltype(ctx.out()) {
return format_to(ctx.out(), "[{}, {}, hash: {}]",
open3d::visualization::rendering::REHandle_abstract::
TypeToString(uid.type),
Expand Down
2 changes: 1 addition & 1 deletion cpp/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ endif()
# Include additional libraries that may be absent from the user system
# eg: libc++.so, libc++abi.so (needed by filament) for Linux.
# libc++.so is a linker script including libc++.so.1 and libc++abi.so, so append 1 to libc++.so
set(PYTHON_EXTRA_LIBRARIES $<TARGET_FILE:tbb>)
set(PYTHON_EXTRA_LIBRARIES $<TARGET_FILE:TBB::tbb>)
if (BUILD_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND PYTHON_EXTRA_LIBRARIES ${CPP_LIBRARY}.1 ${CPPABI_LIBRARY})
endif()
Expand Down

0 comments on commit 4b3fbf4

Please sign in to comment.