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

[CMake] python helpers and unit tests are optionnal

s.t. Pinocchio can depend on the data, and we can provide simultaneously
several python versions
parent 554ce5ee
......@@ -10,8 +10,6 @@ SET(PROJECT_NAME example-robot-data)
SET(PROJECT_DESCRIPTION "Set of robot URDFs for benchmarking and developed examples.")
SET(PROJECT_URL https://gepgitlab.laas.fr/${PROJECT_NAMESPACE}/${PROJECT_NAME})
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
# Print initial message
MESSAGE("${PROJECT_DESCRIPTION}, version ${PROJECT_VERSION}")
MESSAGE("Copyright (C) 2018-2019 CNRS-LAAS")
......@@ -28,16 +26,19 @@ ENDIF()
SETUP_PROJECT()
ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.1.0")
OPTION (BUILD_PYTHON_INTERFACE "Build the python unit tests and helpers" ON)
FINDPYTHON()
IF(BUILD_PYTHON_INTERFACE)
ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.1.0")
FINDPYTHON()
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
ADD_SUBDIRECTORY(${PY_NAME})
ADD_SUBDIRECTORY(unittest)
ENDIF(BUILD_PYTHON_INTERFACE)
INSTALL(DIRECTORY hyq_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY icub_description DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY talos_data DESTINATION share/${PROJECT_NAME})
INSTALL(DIRECTORY tiago_description DESTINATION share/${PROJECT_NAME})
ADD_SUBDIRECTORY(${PY_NAME})
ADD_SUBDIRECTORY(unittest)
SETUP_PROJECT_FINALIZE()
Markdown is supported
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