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

6
7
8
9
10
SET(PROJECT_NAME spline)
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."
 )
SET(PROJECT_URL "")
11
12
13

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

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

22
23
SETUP_PROJECT()

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

38
39
add_subdirectory (src/tests/spline_test)

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

SETUP_PROJECT_FINALIZE()