From 84505dc3a802ef493c7957c663d8438e5816f4d2 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 9 Oct 2019 16:15:59 +0200 Subject: [PATCH] [CMake] add option INSTALL_PYTHON_INTERFACE_ONLY --- CMakeLists.txt | 5 ++++- include/parametric-curves/CMakeLists.txt | 16 ++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b2d131c..86bae53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ SET(BOOST_REQUIERED_COMPONENTS serialization) SET(BOOST_OPTIONAL_COMPONENTS "") OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON) +OPTION (INSTALL_PYTHON_INTERFACE_ONLY "Install only the python binding" OFF) IF(BUILD_PYTHON_INTERFACE) SET(BOOST_OPTIONAL_COMPONENTS ${BOOST_OPTIONAL_COMPONENTS} python) FINDPYTHON() @@ -41,7 +42,9 @@ IF(BUILD_PYTHON_INTERFACE) ADD_SUBDIRECTORY(python) ENDIF(BUILD_PYTHON_INTERFACE) -ADD_SUBDIRECTORY (include/${PROJECT_NAME}) +IF(NOT INSTALL_PYTHON_INTERFACE_ONLY) + ADD_SUBDIRECTORY (include/${CUSTOM_HEADER_DIR}) +ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY) ADD_SUBDIRECTORY (src/tests/spline_test) ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND}) diff --git a/include/parametric-curves/CMakeLists.txt b/include/parametric-curves/CMakeLists.txt index 1ea03fa..ef7eed8 100644 --- a/include/parametric-curves/CMakeLists.txt +++ b/include/parametric-curves/CMakeLists.txt @@ -1,5 +1,5 @@ install(FILES - # bernstein.h + #bernstein.h abstract-curve.hpp MathDefs.h spline.hpp @@ -10,22 +10,22 @@ install(FILES linear-chirp.hpp minimum-jerk.hpp text-file.hpp - # bezier_curve.h + #bezier_curve.h curve-constraint.hpp - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves + DESTINATION include/${CUSTOM_HEADER_DIR} ) install(FILES serialization/eigen-matrix.hpp - #${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/archive.hpp - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/serialization + #serialization/archive.hpp + #serialization/archive.hpp + DESTINATION include/${CUSTOM_HEADER_DIR}/serialization ) install(FILES spatial/force-curve.hpp - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/spatial + DESTINATION include/${CUSTOM_HEADER_DIR}/spatial ) install(FILES utils/file-io.hpp - #${CMAKE_SOURCE_DIR}/include/parametric-curves/serialization/archive.hpp - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/parametric-curves/utils + DESTINATION include/${CUSTOM_HEADER_DIR}/utils )