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

3
INCLUDE(cmake/base.cmake)
Guilhem Saurel's avatar
Guilhem Saurel committed
4
INCLUDE(cmake/boost.cmake)
5
INCLUDE(cmake/test.cmake)
6
INCLUDE(cmake/python.cmake)
7
INCLUDE(cmake/hpp.cmake)
8

9
10
11
12
IF(UNIX OR APPLE)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -std=c++11")
ENDIF()

13
SET(PROJECT_ORG loco-3d)
14
SET(PROJECT_NAME curves)
15
SET(PROJECT_DESCRIPTION
16
17
  "template based classes for creating and manipulating spline and bezier curves. Comes with extra options specific to end-effector trajectories in robotics."
  )
18

19
20
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
21

22
SETUP_HPP_PROJECT()
23

Guilhem Saurel's avatar
Guilhem Saurel committed
24
25
26
27
ADD_REQUIRED_DEPENDENCY(eigen3)

SET(BOOST_COMPONENTS unit_test_framework)

Guilhem Saurel's avatar
Guilhem Saurel committed
28
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" ON)
29
IF(BUILD_PYTHON_INTERFACE)
Guilhem Saurel's avatar
Guilhem Saurel committed
30
31
32
33
  FINDPYTHON()
  INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS})

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

Guilhem Saurel's avatar
Guilhem Saurel committed
35
36
  ADD_REQUIRED_DEPENDENCY("eigenpy")
  SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
37

Guilhem Saurel's avatar
Guilhem Saurel committed
38
  ADD_SUBDIRECTORY(python)
39
40
ENDIF(BUILD_PYTHON_INTERFACE)

Guilhem Saurel's avatar
Guilhem Saurel committed
41
42
SEARCH_FOR_BOOST()
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
43

44
ADD_SUBDIRECTORY(include/curves)
45
ADD_SUBDIRECTORY(tests)
46

47
SETUP_HPP_PROJECT_FINALIZE()