Skip to content

Commit

Permalink
Fix missing fmt library
Browse files Browse the repository at this point in the history
  • Loading branch information
cybaol authored and strasdat committed Jun 12, 2024
1 parent fc9a45c commit 3f54775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ endif()
# Build python sophus bindings
option(BUILD_PYTHON_BINDINGS "Build python sophus bindings." OFF)
if(BUILD_PYTHON_BINDINGS)
if(NOT TARGET fmt::fmt)
find_package(fmt REQUIRED)
endif()
include(FetchContent)
FetchContent_Declare(
pybind11
Expand All @@ -121,7 +124,7 @@ if(BUILD_PYTHON_BINDINGS)
add_subdirectory(${pybind11_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/pybind)
pybind11_add_module(sophus_pybind
${CMAKE_CURRENT_SOURCE_DIR}/sophus_pybind/bindings.cpp)
target_link_libraries(sophus_pybind PUBLIC sophus)
target_link_libraries(sophus_pybind PUBLIC sophus fmt::fmt)
endif(BUILD_PYTHON_BINDINGS)

if(SOPHUS_INSTALL)
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def build_extension(self, ext):

cmake_args = [
"-DBUILD_PYTHON_BINDINGS=ON",
"-DBUILD_SOPHUS_EXAMPLES=OFF",
"-DBUILD_SOPHUS_TESTS=OFF",
]
build_args = []
Expand Down

0 comments on commit 3f54775

Please sign in to comment.