Skip to content

Commit

Permalink
[CMake] add option INSTALL_PYTHON_INTERFACE_ONLY
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 9, 2019
1 parent 2a30dbb commit 84505dc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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})
Expand Down
16 changes: 8 additions & 8 deletions include/parametric-curves/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
install(FILES
# bernstein.h
#bernstein.h
abstract-curve.hpp
MathDefs.h
spline.hpp
Expand All @@ -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
)

0 comments on commit 84505dc

Please sign in to comment.