Commit 4710b123 authored by seanyen's avatar seanyen
Browse files

Use GENERATE_EXPORT_HEADER

parent fa2a7fbc
......@@ -132,13 +132,22 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}${PYTHON_SOABI}")
TARGET_LINK_BOOST_PYTHON(${PROJECT_NAME})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
PKG_CONFIG_USE_DEPENDENCY(${PROJECT_NAME} eigen3)
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
INSTALL(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
ADD_HEADER_GROUP(${PROJECT_NAME}_HEADERS)
ADD_SOURCE_GROUP(${PROJECT_NAME}_SOURCES)
INCLUDE(GenerateExportHeader)
GENERATE_EXPORT_HEADER(${PROJECT_NAME} EXPORT_FILE_NAME eigenpy/${PROJECT_NAME}_export.h)
target_include_directories(${PROJECT_NAME} INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/eigenpy/${PROJECT_NAME}_export.h
DESTINATION include/eigenpy)
# ----------------------------------------------------
# --- PYTHON LIBRARY ---------------------------------
# ----------------------------------------------------
......
......@@ -8,6 +8,7 @@
#include "eigenpy/fwd.hpp"
#include "eigenpy/deprecated.hh"
#include "eigenpy/eigenpy_export.h"
#if EIGEN_VERSION_AT_LEAST(3,2,0)
#include "eigenpy/ref.hpp"
......@@ -25,7 +26,7 @@
namespace eigenpy
{
/* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */
void enableEigenPy();
void EIGENPY_EXPORT enableEigenPy();
template<typename MatType>
void enableEigenPySpecific();
......
......@@ -6,13 +6,15 @@
#ifndef __eigenpy_geometry_hpp__
#define __eigenpy_geometry_hpp__
#include "eigenpy/eigenpy_export.h"
namespace eigenpy
{
void exposeQuaternion();
void exposeAngleAxis();
void EIGENPY_EXPORT exposeQuaternion();
void EIGENPY_EXPORT exposeAngleAxis();
void exposeGeometryConversion();
void EIGENPY_EXPORT exposeGeometryConversion();
} // namespace eigenpy
......
......@@ -17,10 +17,12 @@
#ifndef __eigenpy_preconditioners_hpp__
#define __eigenpy_preconditioners_hpp__
#include "eigenpy/eigenpy_export.h"
namespace eigenpy
{
void exposePreconditioners();
void EIGENPY_EXPORT exposePreconditioners();
} // namespace eigenpy
......
......@@ -17,11 +17,13 @@
#ifndef __eigenpy_solvers_hpp__
#define __eigenpy_solvers_hpp__
#include "eigenpy/eigenpy_export.h"
namespace eigenpy
{
struct SolversScope {};
void exposeSolvers();
void EIGENPY_EXPORT exposeSolvers();
} // namespace eigenpy
......
......@@ -33,6 +33,8 @@ SET_PROPERTY(TARGET ${PYWRAP} PROPERTY LINKER_LANGUAGE CXX)
IF(APPLE)
# We need to change the extension for python bindings
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES SUFFIX ".so")
ELSEIF(WIN32)
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES SUFFIX ".pyd")
ENDIF(APPLE)
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES
......
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