CMakeLists.txt 1.39 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
  i-inverse-kinematics
7
  overview-simple
8
  overview-lie
9
  overview-SE3
10
  overview-urdf
11
  interpolation-SE3
12
  build-reduced-model
13
14
  )

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

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

33
34
35
36
IF(BUILD_PYTHON_INTERFACE)
  SET(${PROJECT_NAME}_PYTHON_EXAMPLES
    i-inverse-kinematics
    overview-simple
37
    overview-urdf
38
39
40
41
    kinematics-derivatives
    fd-derivatives
    id-derivatives
    robot-wrapper-viewer
42
43
    )

44
45
46
47
48
49
  IF(HPP_FCL_FOUND)
    LIST(APPEND ${PROJECT_NAME}_PYTHON_EXAMPLES 
      collisions
      )
  ENDIF(HPP_FCL_FOUND)

50
51
52
53
  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)