Commit 53cffc52 authored by jcarpent's avatar jcarpent
Browse files

[CMake] Properly handle linking against boost_python on OS X

parent 199844a8
......@@ -103,7 +103,12 @@ endif()
ENDIF(HPP_FCL_FOUND AND URDFDOM_FOUND)
SET(BOOST_COMPONENTS filesystem unit_test_framework system)
IF(EIGENPY_FOUND)
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
ENDIF(EIGENPY_FOUND)
SEARCH_FOR_BOOST()
# Path to boost headers
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
......
#
# Copyright (c) 2015 CNRS
# Copyright (c) 2015-2016 CNRS
# Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
#
# This file is part of Pinocchio
......@@ -102,6 +102,7 @@ IF(EIGENPY_FOUND)
SET(PYWRAP ${PROJECT_NAME}_pywrap)
ADD_LIBRARY(${PYWRAP} SHARED python/module.cpp python/python.cpp)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} eigenpy)
IF(URDFDOM_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} urdfdom)
IF(HPP_FCL_FOUND)
......@@ -109,13 +110,15 @@ IF(EIGENPY_FOUND)
ENDIF(HPP_FCL_FOUND)
ENDIF(URDFDOM_FOUND)
IF(HPP_FCL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} hpp-fcl)
ADD_TARGET_CFLAGS (${PYWRAP} "-DWITH_HPP_FCL")
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} hpp-fcl)
ADD_TARGET_CFLAGS (${PYWRAP} "-DWITH_HPP_FCL")
ENDIF(HPP_FCL_FOUND)
IF(LUA5_1_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} lua5.1)
ENDIF(LUA5_1_FOUND)
TARGET_LINK_LIBRARIES(${PYWRAP} ${Boost_LIBRARIES} ${PROJECT_NAME} ${PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(${PYWRAP} ${PROJECT_NAME} ${Boost_LIBRARIES})
TARGET_LINK_BOOST_PYTHON(${PYWRAP})
IF(APPLE)
# We need to change the extension for python bindings
......
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