Verified Commit 92484232 authored by Francois Keith's avatar Francois Keith Committed by Justin Carpentier
Browse files

[Win32] Correct link and symbol export for python build

parent 6b7db0ac
......@@ -132,13 +132,19 @@ IF(BUILD_PYTHON_INTERFACE)
TARGET_LINK_LIBRARIES(${PYWRAP} PUBLIC ${PROJECT_NAME})
TARGET_LINK_BOOST_PYTHON(${PYWRAP} PUBLIC)
IF(URDFDOM_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} urdfdom)
ENDIF(URDFDOM_FOUND)
IF(HPP_FCL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} hpp-fcl)
ENDIF(HPP_FCL_FOUND)
IF(BUILD_WITH_HPP_FCL_PYTHON_BINDINGS)
TARGET_COMPILE_DEFINITIONS(${PYWRAP} PRIVATE -DPINOCCHIO_WITH_HPP_FCL_PYTHON_BINDINGS)
ENDIF(BUILD_WITH_HPP_FCL_PYTHON_BINDINGS)
IF(WIN32)
TARGET_COMPILE_DEFINITIONS(${PYWRAP} PRIVATE -DNOMINMAX)
TARGET_LINK_LIBRARIES(${PYWRAP} PUBLIC ${PYTHON_LIBRARY})
ENDIF(WIN32)
IF(CPPAD_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${PYWRAP} "cppad")
......
......@@ -9,6 +9,16 @@
#include <boost/python.hpp>
#if defined _WIN32
# ifdef pinocchio_pywrap_EXPORTS
# define PINOCCHIO_PYWRAP_DLLAPI __declspec(dllexport)
# else
# define PINOCCHIO_PYWRAP_DLLAPI __declspec(dllimport)
# endif // pinocchio_pywrap_EXPORTS
#else
# define PINOCCHIO_PYWRAP_DLLAPI
#endif // _WIN32
namespace pinocchio
{
namespace python
......@@ -24,6 +34,7 @@ namespace pinocchio
/// \returns The model constructed by the Python script.
///
// TODO: look inside the context of Python and find an occurence of object Model
PINOCCHIO_PYWRAP_DLLAPI
Model buildModel(const std::string & filename,
const std::string & var_name = "model",
bool verbose = false);
......
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