Skip to content

Commit

Permalink
[CMake] add INSTALL_PYTHON_INTERFACE_ONLY option
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 29, 2019
1 parent 98d7d40 commit 3b5d342
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ INCLUDE(cmake/eigen.cmake)

SET(CUSTOM_HEADER_DIR sot/tools)
SET(${PROJECT_NAME}_HEADERS)

SET(DOXYGEN_USE_MATHJAX YES)

OPTION(BUILD_PYTHON_INTERFACE "Build the python bindings" ON)
OPTION(INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python binding" OFF)

CMAKE_POLICY(SET CMP0048 OLD)
PROJECT(${PROJECT_NAME} CXX)

Expand All @@ -31,7 +33,6 @@ ADD_REQUIRED_DEPENDENCY("sot-core >= 3.0")
# Search for dependencies.
SEARCH_FOR_EIGEN()

OPTION(BUILD_PYTHON_INTERFACE "Build the python bindings" ON)
IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON ()
FIND_NUMPY ()
Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ SET_TARGET_PROPERTIES(${LIBRARY_NAME}
SOVERSION ${PROJECT_VERSION}
INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})

INSTALL (TARGETS ${LIBRARY_NAME} DESTINATION lib)
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL (TARGETS ${LIBRARY_NAME} DESTINATION lib)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)

IF(BUILD_PYTHON_INTERFACE)
DYNAMIC_GRAPH_PYTHON_MODULE ("sot/tools" ${LIBRARY_NAME} wrap)
Expand Down

0 comments on commit 3b5d342

Please sign in to comment.