Skip to content
Snippets Groups Projects
Commit 71ff956c authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[cmake] Add the possibility to install only the python binding.

This is not enough to reflect all the patches from robotpkg
about conflict when installing separatly python and C++ code.
parent fddb9548
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,8 @@ SEARCH_FOR_EIGEN()
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0")
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
OPTION (INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python binding" OFF)
IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON(2.7 EXACT REQUIRED)
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
......
......@@ -80,7 +80,9 @@ SET(NEWHEADERS
sot/core/variadic-op.hh
sot/core/robot-utils.hh
)
INSTALL(FILES ${NEWHEADERS}
DESTINATION include/sot/core
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
)
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(FILES ${NEWHEADERS}
DESTINATION include/sot/core
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
)
ENDIF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
......@@ -170,8 +170,10 @@ ENDIF(UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
INSTALL(TARGETS ${LIBRARY_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(TARGETS ${LIBRARY_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
#Plugins compilation, link, and installation
#Compiles a plugin. The plugin library is ${LIBRARY_NAME}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment