Commit b19d6563 authored by jcarpent's avatar jcarpent
Browse files

[Bug fix] Add required depency NUMPY

parent 2eab8e57
......@@ -30,6 +30,7 @@ SET(BOOST_COMPONENTS python)
SEARCH_FOR_BOOST()
set(Python_ADDITIONAL_VERSIONS 2.7)
FINDPYTHON()
FIND_NUMPY()
# ----------------------------------------------------
# --- INCLUDE ----------------------------------------
......@@ -66,34 +67,36 @@ ENDFOREACH(header)
# ----------------------------------------------------
# --- TARGETS ----------------------------------------
# ----------------------------------------------------
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIRS})
# Add Boost path to include directories.
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
SET(eigenpy_SOURCES
SET(${PROJECT_NAME}_SOURCES
src/exception.cpp
src/eigenpy.cpp
src/details.cpp
src/angle-axis.cpp
src/quaternion.cpp
)
)
ADD_LIBRARY(eigenpy SHARED ${eigenpy_SOURCES})
TARGET_LINK_LIBRARIES(eigenpy ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
INSTALL(TARGETS eigenpy DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
# ----------------------------------------------------
# --- UNIT TEST --------------------------------------
# ----------------------------------------------------
ADD_LIBRARY(matrix SHARED unittest/matrix.cpp)
TARGET_LINK_LIBRARIES(matrix ${Boost_LIBRARIES} eigenpy)
TARGET_LINK_LIBRARIES(matrix ${Boost_LIBRARIES} ${PROJECT_NAME})
SET_TARGET_PROPERTIES(matrix PROPERTIES PREFIX "")
ADD_LIBRARY(geometry SHARED unittest/geometry.cpp)
TARGET_LINK_LIBRARIES(geometry ${Boost_LIBRARIES} eigenpy)
TARGET_LINK_LIBRARIES(geometry ${Boost_LIBRARIES} ${PROJECT_NAME})
SET_TARGET_PROPERTIES(geometry PROPERTIES PREFIX "")
PKG_CONFIG_APPEND_CFLAGS(${_Eigen_CFLAGS})
PKG_CONFIG_APPEND_CFLAGS("-I${PYTHON_INCLUDE_DIRS}")
PKG_CONFIG_APPEND_CFLAGS("-I${NUMPY_INCLUDE_DIRS}")
#PKG_CONFIG_APPEND_LIBS_RAW(${Boost_LIBRARIES})
PKG_CONFIG_APPEND_LIBS("boost_python")
PKG_CONFIG_APPEND_LIBS_RAW(${PYTHON_LIBRARIES})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment