CMakeLists.txt 1.82 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
2

3
SET(PROJECT_ORG loco-3d)
4
SET(PROJECT_NAME curves)
5
SET(PROJECT_DESCRIPTION
6
7
  "template based classes for creating and manipulating spline and bezier curves. Comes with extra options specific to end-effector trajectories in robotics."
  )
Guilhem Saurel's avatar
Guilhem Saurel committed
8
9
10
11
12
13
SET(PROJECT_URL "http://gepgitlab.laas.fr/${PROJECT_NAMESPACE}/${PROJECT_NAME}")

INCLUDE(cmake/base.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/test.cmake)
INCLUDE(cmake/python.cmake)
14

15
16
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
17

Guilhem Saurel's avatar
Guilhem Saurel committed
18
19
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
20

Guilhem Saurel's avatar
Guilhem Saurel committed
21
ADD_REQUIRED_DEPENDENCY(eigen3)
22
23
ADD_OPTIONAL_DEPENDENCY(pinocchio)
OPTION(CURVES_WITH_PINOCCHIO_SUPPORT "Build with pinocchio support" ${PINOCCHIO_FOUND})
24
IF(CURVES_WITH_PINOCCHIO_SUPPORT)
25
26
27
  IF(NOT PINOCCHIO_FOUND)
    MESSAGE(FATAL_ERROR "CURVES_WITH_PINOCCHIO_SUPPORT selected, but pinocchio has not been found")
  ENDIF(NOT PINOCCHIO_FOUND)
28
  ADD_DEFINITIONS(-DCURVES_WITH_PINOCCHIO_SUPPORT)
29
  PKG_CONFIG_APPEND_CFLAGS("-DCURVES_WITH_PINOCCHIO_SUPPORT")
30
31
ENDIF(CURVES_WITH_PINOCCHIO_SUPPORT)

Guilhem Saurel's avatar
Guilhem Saurel committed
32
SET(BOOST_COMPONENTS unit_test_framework serialization)
Guilhem Saurel's avatar
Guilhem Saurel committed
33

Guilhem Saurel's avatar
Guilhem Saurel committed
34
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
35
IF(BUILD_PYTHON_INTERFACE)
Guilhem Saurel's avatar
Guilhem Saurel committed
36
37
38
39
  FINDPYTHON()
  INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS})

  STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
40

41
  ADD_REQUIRED_DEPENDENCY("eigenpy >= 1.6.8")
Guilhem Saurel's avatar
Guilhem Saurel committed
42
  SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
43
44
ENDIF(BUILD_PYTHON_INTERFACE)

45
46
47
#find_package(Boost 1.58 REQUIRED unit_test_framework system serialization)
#SET(BOOST_COMPONENTS unit_test_framework serialization)

Guilhem Saurel's avatar
Guilhem Saurel committed
48
49
SEARCH_FOR_BOOST()
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
50

51
52
53
54
IF(BUILD_PYTHON_INTERFACE)
  ADD_SUBDIRECTORY(python)
ENDIF(BUILD_PYTHON_INTERFACE)

55
ADD_SUBDIRECTORY(include/curves)
56
ADD_SUBDIRECTORY(tests)