CMakeLists.txt 1.08 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
  overview-simple
7
  overview-lie
8
  #overview-urdf
9
10
  )

11
12
13
14
15
16
17
IF(EIGEN3_VERSION VERSION_GREATER 3.2.90)
  SET(${PROJECT_NAME}_EXAMPLES
    ${${PROJECT_NAME}_EXAMPLES}
    i-inverse-kinematics
    )
ENDIF(EIGEN3_VERSION VERSION_GREATER 3.2.90)

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

30
31
32
33
34
35
36
37
38
39
40
IF(BUILD_PYTHON_INTERFACE)
  SET(${PROJECT_NAME}_PYTHON_EXAMPLES
    i-inverse-kinematics
    overview-simple
    #overview-urdf
    )

  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)