From 546d192be67e80070e473d6445f9b0f81ff63c0e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Mon, 25 Nov 2019 22:52:27 +0100 Subject: [PATCH] add path.hpp.in to ease data finding in C++ ref https://github.com/stack-of-tasks/pinocchio/issues/965 --- CMakeLists.txt | 1 + include/example-robot-data/CMakeLists.txt | 2 ++ include/example-robot-data/path.hpp.in | 6 ++++++ 3 files changed, 9 insertions(+) create mode 100644 include/example-robot-data/CMakeLists.txt create mode 100644 include/example-robot-data/path.hpp.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 335eff3..d62257f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ IF(BUILD_PYTHON_INTERFACE) ENDIF(BUILD_PYTHON_INTERFACE) IF(NOT INSTALL_PYTHON_INTERFACE_ONLY) + ADD_SUBDIRECTORY(include/${CUSTOM_HEADER_DIR}) INSTALL(DIRECTORY robots/anymal_b_simple_description DESTINATION share/${PROJECT_NAME}/robots) INSTALL(DIRECTORY robots/hyq_description DESTINATION share/${PROJECT_NAME}/robots) INSTALL(DIRECTORY robots/solo_description DESTINATION share/${PROJECT_NAME}/robots) diff --git a/include/example-robot-data/CMakeLists.txt b/include/example-robot-data/CMakeLists.txt new file mode 100644 index 0000000..34f2f23 --- /dev/null +++ b/include/example-robot-data/CMakeLists.txt @@ -0,0 +1,2 @@ +CONFIGURE_FILE(path.hpp.in path.hpp) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/path.hpp DESTINATION include/${CUSTOM_HEADER_DIR}) diff --git a/include/example-robot-data/path.hpp.in b/include/example-robot-data/path.hpp.in new file mode 100644 index 0000000..4788304 --- /dev/null +++ b/include/example-robot-data/path.hpp.in @@ -0,0 +1,6 @@ +#ifndef EXAMPLE_ROBOT_DATA_PATH_HPP +#define EXAMPLE_ROBOT_DATA_PATH_HPP + +#define EXAMPLE_ROBOT_DATA_MODEL_DIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/robots" + +#endif -- GitLab