Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ endif()

target_include_directories(franka PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:include/libfranka>
)

target_link_libraries(franka PRIVATE
Expand All @@ -135,16 +135,15 @@ target_link_libraries(franka PUBLIC
)

## Installation
include(GNUInstallDirs)
set(INSTALL_CMAKE_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/Franka)
set(INSTALL_CMAKE_CONFIG_DIR share/franka/cmake)

install(TARGETS franka libfranka-common
EXPORT FrankaTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/libfranka
ARCHIVE DESTINATION lib
)
install(DIRECTORY include/ common/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
install(DIRECTORY include/ common/include/ DESTINATION include/libfranka
USE_SOURCE_PERMISSIONS
)

Expand Down Expand Up @@ -172,6 +171,9 @@ install(EXPORT FrankaTargets
DESTINATION ${INSTALL_CMAKE_CONFIG_DIR}
)

# Install catkin package.xml
install(FILES package.xml DESTINATION share/libfranka)

## Subprojects

# Ignore find_package(Franka) in subprojects.
Expand Down
5 changes: 2 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ target_link_libraries(joint_impedance_control Threads::Threads pinocchio::pinocc
target_link_libraries(motion_with_control Poco::Foundation)
target_link_libraries(motion_with_control_external_control_loop Poco::Foundation)

include(GNUInstallDirs)
install(TARGETS ${EXAMPLES}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/libfranka
)
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

<build_depend>eigen</build_depend>
<build_depend>libpoco-dev</build_depend>
<build_depend>pinocchio</build_depend>

<exec_depend>libpoco-dev</exec_depend>
<exec_depend>pinocchio</exec_depend>

<doc_depend>doxygen</doc_depend>
<doc_depend>graphviz</doc_depend>
Expand Down