Skip to content

Commit

Permalink
privately link fmt, but propagate its header (#4779)
Browse files Browse the repository at this point in the history
  • Loading branch information
yxlao authored Feb 19, 2022
1 parent 1aa25b9 commit 9da1f9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -994,10 +994,9 @@ if(USE_SYSTEM_FMT)
endif()
endif()
if(NOT USE_SYSTEM_FMT)
# We set the FMT_HEADER_ONLY macro, so no need to actually compile the source
include(${Open3D_3RDPARTY_DIR}/fmt/fmt.cmake)
open3d_import_3rdparty_library(3rdparty_fmt
PUBLIC
HEADER
INCLUDE_DIRS ${FMT_INCLUDE_DIRS}
LIB_DIR ${FMT_LIB_DIR}
LIBRARIES ${FMT_LIBRARIES}
Expand All @@ -1008,7 +1007,7 @@ if(NOT USE_SYSTEM_FMT)
target_compile_definitions(3rdparty_fmt INTERFACE FMT_USE_WINDOWS_H=0)
target_compile_definitions(3rdparty_fmt INTERFACE FMT_STRING_ALIAS=1)
endif()
list(APPEND Open3D_3RDPARTY_PUBLIC_TARGETS Open3D::3rdparty_fmt)
list(APPEND Open3D_3RDPARTY_HEADER_TARGETS Open3D::3rdparty_fmt)

# Pybind11
if (BUILD_PYTHON_MODULE)
Expand Down

0 comments on commit 9da1f9e

Please sign in to comment.