From 24fa1506422c1136edad78c2406e555fe88e916c Mon Sep 17 00:00:00 2001 From: Guilhem Saurel <guilhem.saurel@laas.fr> Date: Sun, 14 May 2023 12:30:43 +0200 Subject: [PATCH] CMake: fix header installation for cases when we dont build in the source dir. --- CMakeLists.txt | 3 ++- include/example-robot-data/CMakeLists.txt | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 include/example-robot-data/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c84b1b8..b66f716 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,8 @@ if(NOT INSTALL_PYTHON_INTERFACE_ONLY) EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib) - add_subdirectory(include/${CUSTOM_HEADER_DIR}) + install(FILES include/${CUSTOM_HEADER_DIR}/path.hpp + DESTINATION include/${CUSTOM_HEADER_DIR}) install(DIRECTORY robots DESTINATION share/${PROJECT_NAME}) install(FILES package.xml DESTINATION share/${PROJECT_NAME}) endif(NOT INSTALL_PYTHON_INTERFACE_ONLY) diff --git a/include/example-robot-data/CMakeLists.txt b/include/example-robot-data/CMakeLists.txt deleted file mode 100644 index aec0656..0000000 --- a/include/example-robot-data/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/path.hpp - DESTINATION include/${CUSTOM_HEADER_DIR}) -- GitLab