Skip to content
Snippets Groups Projects
CMakeLists.txt 779 B
Newer Older
Nicolas Mansard's avatar
Nicolas Mansard committed
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
Nicolas Mansard committed

Nicolas Mansard's avatar
Nicolas Mansard committed
IF(Boost_FOUND)
Nicolas Mansard's avatar
Nicolas Mansard committed

  INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}" "/usr/include/python2.7" "/usr/include/eigen3")
Nicolas Mansard's avatar
Nicolas Mansard committed

  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
  ADD_LIBRARY(eigenpy SHARED unittest/libeigenpy.cpp)
  TARGET_LINK_LIBRARIES(eigenpy ${Boost_LIBRARIES})

Nicolas Mansard's avatar
Nicolas Mansard committed
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()