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

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

set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/build/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/")
15
16
17
18
set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/lib/")
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True)
19
20
21
22

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

23
24
SETUP_PROJECT()

25
OPTION (BUILD_PYTHON_INTERFACE "Build the python binding" OFF)
26
27
28
29
30
31
32
33
34
35
36
37
38
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)

39
add_subdirectory (tests)
40

t steve's avatar
t steve committed
41
42
install(FILES
	${CMAKE_SOURCE_DIR}/include/spline/bernstein.h
t steve's avatar
t steve committed
43
	${CMAKE_SOURCE_DIR}/include/spline/bezier_polynom_conversion.h
t steve's avatar
t steve committed
44
45
46
47
48
49
50
51
52
53
54
	${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
55

t steve's avatar
t steve committed
56
57
58
59
60
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
	)
61
62

SETUP_PROJECT_FINALIZE()