CMakeLists.txt 1.53 KB
Newer Older
Justin Carpentier's avatar
Justin Carpentier committed
1
2
3
4
#
# Copyright (c) 2015-2019 CNRS INRIA
#

5
SET(${PROJECT_NAME}_EXAMPLES
6
  inverse-kinematics
7
  overview-simple
8
  overview-lie
9
  overview-SE3
10
  overview-urdf
11
  interpolation-SE3
12
  build-reduced-model
13
  geometry-models
14
15
  )

16
17
ADD_DEFINITIONS(-DPINOCCHIO_MODEL_DIR="${PINOCCHIO_MODEL_DIR}")

18
FOREACH(EXAMPLE ${${PROJECT_NAME}_EXAMPLES})
19
20
  SET(EXAMPLE_NAME "example-${EXAMPLE}")
  ADD_UNIT_TEST(${EXAMPLE_NAME} ${EXAMPLE})
21
  TARGET_LINK_LIBRARIES(${EXAMPLE_NAME} ${PROJECT_NAME})
22
  PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} eigen3)
23
24
25
  IF(URDFDOM_FOUND)
    PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} urdfdom)
  ENDIF(URDFDOM_FOUND)
26
  IF(HPP_FCL_FOUND)
27
    PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} hpp-fcl)
28
  ENDIF(HPP_FCL_FOUND)
29
30
31
  IF(CPPAD_FOUND)
    PKG_CONFIG_USE_DEPENDENCY(${EXAMPLE_NAME} "cppad")
  ENDIF(CPPAD_FOUND)
32
ENDFOREACH(EXAMPLE ${${PROJECT_NAME}_EXAMPLES})
33

34
35
IF(BUILD_PYTHON_INTERFACE)
  SET(${PROJECT_NAME}_PYTHON_EXAMPLES
36
    inverse-kinematics
37
    overview-simple
38
    overview-urdf
39
40
41
    kinematics-derivatives
    fd-derivatives
    id-derivatives
42
43
    gepetto-viewer
    meshcat-viewer
Gabriele Buondonno's avatar
Gabriele Buondonno committed
44
    meshcat-viewer-dae
45
    robot-wrapper-viewer
46
    geometry-models
47
48
    )

49
50
51
  IF(HPP_FCL_FOUND)
    LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES 
      collisions
52
      sample-model-viewer
53
      display_shapes
54
55
56
      )
  ENDIF(HPP_FCL_FOUND)

57
58
59
60
  FOREACH(EXAMPLE ${${PROJECT_NAME}_PYTHON_EXAMPLES})
    ADD_PYTHON_UNIT_TEST("py-example-${EXAMPLE}" "examples/${EXAMPLE}.py" "bindings/python")
  ENDFOREACH(EXAMPLE ${${PROJECT_NAME}_PYTHON_EXAMPLES})
ENDIF(BUILD_PYTHON_INTERFACE)