Commit dd9e39be authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] add INSTALL_PYTHON_INTERFACE_ONLY option

parent 6e0aa923
Pipeline #8651 passed with stage
in 7 minutes and 1 second
#
# Copyright 2010, 2018 CNRS
# Author: Florent Lamiraux
# Copyright 2010, 2018, 2019 CNRS
# Authors: Florent Lamiraux, Guilhem Saurel
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
......@@ -14,6 +14,11 @@ INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/test.cmake)
INCLUDE(cmake/python.cmake)
INCLUDE(cmake/sphinx.cmake)
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
OPTION (INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python binding" OFF)
SET (CUSTOM_HEADER_DIR "dynamic-graph/tutorial")
CMAKE_POLICY(SET CMP0048 OLD)
PROJECT(${PROJECT_NAME} CXX)
......@@ -22,7 +27,6 @@ ADD_REQUIRED_DEPENDENCY("dynamic-graph")
SET(BOOST_COMPONENTS unit_test_framework)
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
IF(BUILD_PYTHON_INTERFACE)
ADD_REQUIRED_DEPENDENCY("dynamic-graph-python")
FINDPYTHON()
......@@ -34,7 +38,7 @@ ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST()
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
ADD_SUBDIRECTORY(include/dynamic-graph/tutorial)
ADD_SUBDIRECTORY(include/${CUSTOM_HEADER_DIR})
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(tests)
# Copyright 2010, Florent Lamiraux, CNRS
# Copyright 2010, 2019, Florent Lamiraux, Guilhem Saurel CNRS
#
INCLUDE(../cmake/sphinx.cmake)
SPHINX_SETUP()
SPHINX_FINALIZE()
......@@ -3,7 +3,6 @@ SET(${PROJECT_NAME}_HEADERS
feedback-controller.hh
)
INSTALL(FILES
${${PROJECT_NAME}_HEADERS}
DESTINATION include/dynamic-graph/tutorial/
)
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(FILES ${${PROJECT_NAME}_HEADERS} DESTINATION include/${CUSTOM_HEADER_DIR})
ENDIF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
......@@ -20,4 +20,6 @@ IF(BUILD_PYTHON_INTERFACE)
INSTALL(FILES ${${PY_NAME}_PYTHON} DESTINATION "${PYTHON_SITELIB}/dynamic_graph/tutorial/")
ENDIF(BUILD_PYTHON_INTERFACE)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
ENDIF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment