CMakeLists.txt 1.89 KB
Newer Older
1 2
cmake_minimum_required(VERSION 2.6)
project(spline)
3
INCLUDE(cmake/base.cmake)
4
INCLUDE(cmake/test.cmake)
5
INCLUDE(cmake/python.cmake)
6

Guilhem Saurel's avatar
Guilhem Saurel committed
7 8
SET(PROJECT_ORG humanoid-path-planner)
SET(PROJECT_NAME hpp-spline)
9 10 11
SET(PROJECT_DESCRIPTION
	 "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
12
SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
13

14 15 16
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True)
17 18 19 20

find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})

21 22
SETUP_PROJECT()

23
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" OFF)
24 25 26 27 28 29 30 31 32 33 34 35 36
IF(BUILD_PYTHON_INTERFACE)
# search for python
	FINDPYTHON(2.7 REQUIRED)
	find_package( PythonLibs 2.7 REQUIRED )
	include_directories( ${PYTHON_INCLUDE_DIRS} )

	find_package( Boost COMPONENTS python REQUIRED )
	include_directories( ${Boost_INCLUDE_DIR} )

	add_subdirectory (python)

ENDIF(BUILD_PYTHON_INTERFACE)

37
add_subdirectory (tests)
38

39 40
install(FILES
	${CMAKE_SOURCE_DIR}/include/spline/bernstein.h
41
	${CMAKE_SOURCE_DIR}/include/spline/bezier_polynom_conversion.h
42 43 44 45 46 47 48 49 50 51 52
	${CMAKE_SOURCE_DIR}/include/spline/curve_abc.h
	${CMAKE_SOURCE_DIR}/include/spline/exact_cubic.h
	${CMAKE_SOURCE_DIR}/include/spline/MathDefs.h
	${CMAKE_SOURCE_DIR}/include/spline/polynom.h
	${CMAKE_SOURCE_DIR}/include/spline/spline_deriv_constraint.h
	${CMAKE_SOURCE_DIR}/include/spline/bezier_curve.h
	${CMAKE_SOURCE_DIR}/include/spline/cubic_spline.h
	${CMAKE_SOURCE_DIR}/include/spline/curve_constraint.h
	${CMAKE_SOURCE_DIR}/include/spline/quintic_spline.h
	DESTINATION ${CMAKE_INSTALL_PREFIX}/include/spline
	)
Guilhem Saurel's avatar
Guilhem Saurel committed
53

54 55 56 57 58
install(FILES
	${CMAKE_SOURCE_DIR}/include/spline/helpers/effector_spline.h
	${CMAKE_SOURCE_DIR}/include/spline/helpers/effector_spline_rotation.h
	DESTINATION ${CMAKE_INSTALL_PREFIX}/include/spline/helpers
	)
59 60

SETUP_PROJECT_FINALIZE()