Verified Commit 4f5078b4 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: fix packaging when urdfdom is missing

parent f021cc4c
...@@ -24,25 +24,34 @@ SET(${PROJECT_NAME}_EXAMPLES ...@@ -24,25 +24,34 @@ SET(${PROJECT_NAME}_EXAMPLES
overview-simple overview-simple
overview-lie overview-lie
overview-SE3 overview-SE3
overview-urdf
interpolation-SE3 interpolation-SE3
build-reduced-model build-reduced-model
geometry-models
kinematics-derivatives
forward-dynamics-derivatives
inverse-dynamics-derivatives
) )
IF(BUILD_ADVANCED_TESTING) IF(BUILD_WITH_UDRF_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_EXAMPLES LIST(APPEND ${PROJECT_NAME}_EXAMPLES
multiprecision overview-urdf
) geometry-models
kinematics-derivatives
forward-dynamics-derivatives
inverse-dynamics-derivatives
)
ENDIF()
IF(BUILD_ADVANCED_TESTING)
IF(BUILD_WITH_UDRF_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_EXAMPLES
multiprecision
)
ENDIF()
ENDIF(BUILD_ADVANCED_TESTING) ENDIF(BUILD_ADVANCED_TESTING)
IF(HPP_FCL_FOUND) IF(HPP_FCL_FOUND)
LIST(APPEND ${PROJECT_NAME}_EXAMPLES IF(BUILD_WITH_UDRF_SUPPORT)
collisions LIST(APPEND ${PROJECT_NAME}_EXAMPLES
) collisions
)
ENDIF()
ENDIF(HPP_FCL_FOUND) ENDIF(HPP_FCL_FOUND)
ADD_DEFINITIONS(-DPINOCCHIO_MODEL_DIR="${PINOCCHIO_MODEL_DIR}") ADD_DEFINITIONS(-DPINOCCHIO_MODEL_DIR="${PINOCCHIO_MODEL_DIR}")
...@@ -51,31 +60,40 @@ FOREACH(EXAMPLE ${${PROJECT_NAME}_EXAMPLES}) ...@@ -51,31 +60,40 @@ FOREACH(EXAMPLE ${${PROJECT_NAME}_EXAMPLES})
ADD_PINOCCHIO_CPP_EXAMPLE(${EXAMPLE}) ADD_PINOCCHIO_CPP_EXAMPLE(${EXAMPLE})
ENDFOREACH(EXAMPLE ${${PROJECT_NAME}_EXAMPLES}) ENDFOREACH(EXAMPLE ${${PROJECT_NAME}_EXAMPLES})
IF(BUILD_ADVANCED_TESTING) IF(BUILD_ADVANCED_TESTING AND BUILD_WITH_UDRF_SUPPORT)
SET_PROPERTY(TARGET example-cpp-multiprecision PROPERTY CXX_STANDARD 11) SET_PROPERTY(TARGET example-cpp-multiprecision PROPERTY CXX_STANDARD 11)
ENDIF(BUILD_ADVANCED_TESTING) ENDIF(BUILD_ADVANCED_TESTING AND BUILD_WITH_UDRF_SUPPORT)
IF(BUILD_PYTHON_INTERFACE) IF(BUILD_PYTHON_INTERFACE)
SET(${PROJECT_NAME}_PYTHON_EXAMPLES SET(${PROJECT_NAME}_PYTHON_EXAMPLES
inverse-kinematics inverse-kinematics
overview-simple overview-simple
overview-urdf
kinematics-derivatives kinematics-derivatives
forward-dynamics-derivatives forward-dynamics-derivatives
inverse-dynamics-derivatives inverse-dynamics-derivatives
gepetto-viewer
meshcat-viewer
meshcat-viewer-dae
robot-wrapper-viewer
geometry-models
) )
IF(BUILD_WITH_UDRF_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES
overview-urdf
gepetto-viewer
meshcat-viewer
meshcat-viewer-dae
robot-wrapper-viewer
geometry-models
)
ENDIF(BUILD_WITH_UDRF_SUPPORT)
IF(HPP_FCL_FOUND) IF(HPP_FCL_FOUND)
LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES
collisions
sample-model-viewer sample-model-viewer
display-shapes display-shapes
) )
IF(BUILD_WITH_UDRF_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES
collisions
)
ENDIF(BUILD_WITH_UDRF_SUPPORT)
ENDIF(HPP_FCL_FOUND) ENDIF(HPP_FCL_FOUND)
FOREACH(EXAMPLE ${${PROJECT_NAME}_PYTHON_EXAMPLES}) FOREACH(EXAMPLE ${${PROJECT_NAME}_PYTHON_EXAMPLES})
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
# Copyright (c) 2020 INRIA # Copyright (c) 2020 INRIA
# #
IF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT) IF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT AND BUILD_WITH_URDF_SUPPORT)
ADD_PINOCCHIO_CPP_EXAMPLE(codegen-crba) ADD_PINOCCHIO_CPP_EXAMPLE(codegen-crba)
SET_PROPERTY(TARGET example-cpp-codegen-crba PROPERTY CXX_STANDARD 11) SET_PROPERTY(TARGET example-cpp-codegen-crba PROPERTY CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(example-cpp-codegen-crba ${CMAKE_DL_LIBS}) TARGET_LINK_LIBRARIES(example-cpp-codegen-crba ${CMAKE_DL_LIBS})
ENDIF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT) ENDIF(CPPADCG_FOUND AND BUILD_WITH_CODEGEN_SUPPORT AND BUILD_WITH_URDF_SUPPORT)
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