Skip to content

Commit

Permalink
Pull request #211: Fix/fmt dependency
Browse files Browse the repository at this point in the history
Merge in MOCTRL/libfranka from fix/fmt-dependency to main

* commit '7a427acf7bb9e4b81123ae860e793179ba20a521':
  fix: Removed the fetched FMT from being installed while doing 'cpack'
  add: install logging examples
  fix: fmt linking
  • Loading branch information
BarisYazici authored and AndreasKuhner committed Nov 8, 2024
2 parents 141733f + 7a427ac commit 9a5e5f1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ci/Dockerfile.focal
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update \
git \
libeigen3-dev \
libpoco-dev \
libfmt-dev \
python3-dev \
python3-pip \
liburdfdom-headers-dev \
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN apt-get update \
git \
libeigen3-dev \
libpoco-dev \
libfmt-dev \
python3-dev \
python3-pip \
liburdfdom-headers-dev \
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ set(CPACK_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_PROCESSOR})
# Debian versions require a dash
set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}-1)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Franka Robotics GmbH")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpoco-dev")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpoco-dev, libfmt-dev, libeigen3-dev")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "ros-kinetic-libfranka, ros-melodic-libfranka, ros-noetic-libfranka, ros-foxy-libfranka, ros-humble-libfranka")
include(CPack)

Expand Down
6 changes: 5 additions & 1 deletion cmake/FetchFMT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ if(NOT fmt_FOUND)
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG 11.0.2)
FetchContent_MakeAvailable(fmt)
FetchContent_GetProperties(fmt)
if(NOT fmt_POPULATED)
FetchContent_Populate(fmt)
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()

set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON)

Expand Down
6 changes: 5 additions & 1 deletion examples/utility_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ foreach(example ${EXAMPLES})
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(${example} Franka::Franka examples_common Eigen3::Eigen3 pinocchio::pinocchio)
target_link_libraries(${example} Franka::Franka examples_common fmt::fmt)

install(TARGETS ${example}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endforeach()

0 comments on commit 9a5e5f1

Please sign in to comment.