Skip to content

Commit

Permalink
Use find_description_package
Browse files Browse the repository at this point in the history
  • Loading branch information
arntanguy committed Mar 15, 2024
1 parent b0a4b67 commit 212abbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
19 changes: 2 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,8 @@ set(CMAKE_CXX_STANDARD 11)
find_package(hoap3_description REQUIRED)
find_package(mc_rtc REQUIRED)

if("${hoap3_description_INSTALL_PREFIX}" STREQUAL "")
if("${hoap3_description_SOURCE_PREFIX}" STREQUAL "")
message(
FATAL_ERROR
"Your hoap3_description package does not define where to find the data")
endif()
set(HOAP3_DESCRIPTION_PATH "${hoap3_description_SOURCE_PREFIX}")
else()
if(EXISTS "${hoap3_description_INSTALL_PREFIX}/share/hoap3_description")
set(HOAP3_DESCRIPTION_PATH
"${hoap3_description_INSTALL_PREFIX}/share/hoap3_description")
else()
set(HOAP3_DESCRIPTION_PATH "${hoap3_description_INSTALL_PREFIX}")
endif()
endif()

message("HOAP3_DESCRIPTION_PATH: ${HOAP3_DESCRIPTION_PATH}")
find_description_package(hoap3_description)
message(STATUS "HOAP3_DESCRIPTION_PATH: ${HOAP3_DESCRIPTION_PATH}")
configure_file(src/config.h.in "${CMAKE_CURRENT_BINARY_DIR}/include/config.h")

add_robot(hoap3 src/hoap3.cpp src/hoap3.h)
Expand Down
2 changes: 1 addition & 1 deletion src/hoap3.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C"
{
ROBOT_MODULE_API void MC_RTC_ROBOT_MODULE(std::vector<std::string> & names)
{
names = {"HOAP3", "HOAP3::Fixed"};
names = {"HOAP3", "HOAP3::Canonical", "HOAP3::Fixed", "HOAP3::Fixed::Canonical"};
}
ROBOT_MODULE_API void destroy(mc_rbdyn::RobotModule * ptr)
{
Expand Down

0 comments on commit 212abbe

Please sign in to comment.