CMakeLists.txt 779 Bytes
Newer Older
Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
1
2
3
4
5
6
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(NOT CMAKE_BUILD_TYPE)
  SET(CMAKE_BUILD_TYPE "DEBUG")
ENDIF()

FIND_PACKAGE(Boost 1.45.0)
Nicolas Mansard's avatar
IVIGIT.    
Nicolas Mansard committed
7

Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
8
IF(Boost_FOUND)
Nicolas Mansard's avatar
IVIGIT.    
Nicolas Mansard committed
9

10
  INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" "/usr/include/python2.7" "/usr/include/eigen3")
Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
11
12
13
14
15
16

  SET(Boost_USE_STATIC_LIBS OFF)
  SET(Boost_USE_MULTITHREADED ON)
  SET(Boost_USE_STATIC_RUNTIME OFF)
  FIND_PACKAGE(Boost 1.45.0 COMPONENTS python)

Nicolas Mansard's avatar
Nicolas Mansard committed
17
18
19
  ADD_LIBRARY(eigenpy SHARED unittest/libeigenpy.cpp)
  TARGET_LINK_LIBRARIES(eigenpy ${Boost_LIBRARIES})

Nicolas Mansard's avatar
IVIGIT.  
Nicolas Mansard committed
20
21
22
23
24
25
26
27
28
29
ELSEIF(NOT Boost_FOUND)
  MESSAGE(FATAL_ERROR "Unable to find correct Boost version. Did you set BOOST_ROOT?")
ENDIF()


IF(CMAKE_COMPILER_IS_GNUCXX)
  ADD_DEFINITIONS("-Wall")
ELSE()
  MESSAGE(FATAL_ERROR "CMakeLists.txt has not been tested/written for your compiler.")
ENDIF()