Commit 30ebc395 authored by jcarpent's avatar jcarpent
Browse files

[CMake] Handle the link against boost_python with the new cmake macro

parent ae6cfc58
......@@ -118,7 +118,7 @@ ELSE(APPLE)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
ENDIF(APPLE)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME})
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
......@@ -126,11 +126,13 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
# --- UNIT TEST --------------------------------------
# ----------------------------------------------------
ADD_LIBRARY(matrix SHARED unittest/matrix.cpp)
TARGET_LINK_LIBRARIES(matrix ${Boost_LIBRARIES} ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(matrix ${PROJECT_NAME})
TARGET_LINK_BOOST_PYTHON(matrix)
SET_TARGET_PROPERTIES(matrix PROPERTIES PREFIX "")
ADD_LIBRARY(geometry SHARED unittest/geometry.cpp)
TARGET_LINK_LIBRARIES(geometry ${Boost_LIBRARIES} ${PROJECT_NAME})
TARGET_LINK_LIBRARIES(geometry ${PROJECT_NAME})
TARGET_LINK_BOOST_PYTHON(geometry)
SET_TARGET_PROPERTIES(geometry PROPERTIES PREFIX "")
IF(EIGEN_NUMPY_ALIGNED)
......@@ -141,7 +143,5 @@ PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
PKG_CONFIG_APPEND_CFLAGS("-I${PYTHON_INCLUDE_DIRS}")
PKG_CONFIG_APPEND_CFLAGS("-I${NUMPY_INCLUDE_DIRS}")
PKG_CONFIG_APPEND_BOOST_LIBS(${BOOST_COMPONENTS})
PKG_CONFIG_APPEND_LIBS_RAW(${PYTHON_LIBRARIES})
SETUP_PROJECT_FINALIZE()
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