Commit 32fc4c93 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

CMake: deactivate py2cpp by default

parent a277be86
Pipeline #20776 failed with stage
in 4 minutes and 14 seconds
......@@ -8,6 +8,7 @@ set(PROJECT_URL https://github.com/${PROJECT_NAMESPACE}/${PROJECT_NAME})
# Project options
option(BUILD_PYTHON_INTERFACE "Build the python binding" ON)
option(BUILD_PY2CPP_INTERFACE "Build the py2cpp library" OFF)
option(SUFFIX_SO_VERSION "Suffix library name with its version" ON)
# Project configuration
......@@ -117,16 +118,18 @@ endif()
# Python Bindings
if(BUILD_PYTHON_INTERFACE)
add_library(${PROJECT_NAME}_py2cpp SHARED src/py2cpp.cpp include/${PROJECT_NAME}/py2cpp.hpp)
if(SUFFIX_SO_VERSION)
set_target_properties(${PROJECT_NAME}_py2cpp PROPERTIES SOVERSION ${PROJECT_VERSION})
if(BUILD_PY2CPP_INTERFACE)
add_library(${PROJECT_NAME}_py2cpp SHARED src/py2cpp.cpp include/${PROJECT_NAME}/py2cpp.hpp)
if(SUFFIX_SO_VERSION)
set_target_properties(${PROJECT_NAME}_py2cpp PROPERTIES SOVERSION ${PROJECT_VERSION})
endif()
install(FILES include/${PROJECT_NAME}/py2cpp.hpp DESTINATION include/${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME}_py2cpp EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
target_link_libraries(${PROJECT_NAME}_py2cpp PUBLIC crocoddyl::crocoddyl)
target_link_libraries(${PROJECT_NAME}_py2cpp PRIVATE ${PYTHON_LIBRARIES})
target_include_directories(${PROJECT_NAME}_py2cpp PRIVATE ${PYTHON_INCLUDE_DIRS})
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME}_py2cpp PRIVATE)
endif()
install(FILES include/${PROJECT_NAME}/py2cpp.hpp DESTINATION include/${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME}_py2cpp EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
target_link_libraries(${PROJECT_NAME}_py2cpp PUBLIC crocoddyl::crocoddyl)
target_link_libraries(${PROJECT_NAME}_py2cpp PRIVATE ${PYTHON_LIBRARIES})
target_include_directories(${PROJECT_NAME}_py2cpp PRIVATE ${PYTHON_INCLUDE_DIRS})
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME}_py2cpp PRIVATE)
add_subdirectory(python)
endif()
......
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