Skip to content

Commit

Permalink
Fix HdfProxyFactory dll export (#217)
Browse files Browse the repository at this point in the history
Clean example CMakeLists
  • Loading branch information
philippeVerney authored Feb 28, 2020
1 parent 5f46643 commit 6c6d511
Show file tree
Hide file tree
Showing 26 changed files with 810 additions and 145 deletions.
4 changes: 4 additions & 0 deletions cmake/swigModule.i
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ namespace COMMON_NS

void clear();

bool hasHdfProxyFactory();

std::vector<RESQML2_0_1_NS::LocalDepth3dCrs*> getLocalDepth3dCrsSet() const;

std::vector<RESQML2_0_1_NS::LocalTime3dCrs*> getLocalTime3dCrsSet() const;
Expand Down Expand Up @@ -536,6 +538,8 @@ namespace COMMON_NS
RESQML2_0_1_NS::PolylineSetRepresentation* createPolylineSetRepresentation(RESQML2_NS::AbstractFeatureInterpretation* interp,
const std::string & guid, const std::string & title, gsoap_resqml2_0_1::resqml20__LineRole roleKind);

RESQML2_0_1_NS::PointSetRepresentation* createPointSetRepresentation(const std::string & guid, const std::string & title);

RESQML2_0_1_NS::PointSetRepresentation* createPointSetRepresentation(RESQML2_NS::AbstractFeatureInterpretation* interp,
const std::string & guid, const std::string & title);

Expand Down
4 changes: 4 additions & 0 deletions cmake/swigModule_experimental.i
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ namespace COMMON_NS

void clear();

bool hasHdfProxyFactory();

std::vector<RESQML2_0_1_NS::LocalDepth3dCrs*> getLocalDepth3dCrsSet() const;

std::vector<RESQML2_0_1_NS::LocalTime3dCrs*> getLocalTime3dCrsSet() const;
Expand Down Expand Up @@ -589,6 +591,8 @@ namespace COMMON_NS
RESQML2_0_1_NS::PolylineSetRepresentation* createPolylineSetRepresentation(RESQML2_NS::AbstractFeatureInterpretation* interp,
const std::string & guid, const std::string & title, gsoap_resqml2_0_1::resqml20__LineRole roleKind);

RESQML2_0_1_NS::PointSetRepresentation* createPointSetRepresentation(const std::string & guid, const std::string & title);

RESQML2_0_1_NS::PointSetRepresentation* createPointSetRepresentation(RESQML2_NS::AbstractFeatureInterpretation* interp,
const std::string & guid, const std::string & title);

Expand Down
39 changes: 13 additions & 26 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,39 @@ CMAKE_MINIMUM_REQUIRED (VERSION 3.12)

PROJECT (Fesapi_Example)

# ============================================================================
# include directories
# ============================================================================

INCLUDE_DIRECTORIES (
${FESAPI_ROOT_DIR}/src/
${HDF5_INCLUDE_DIRS}
${MINIZIP_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS}
)

IF (WITH_SZIP)
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
ENDIF (WITH_SZIP)

IF (UNIX)
INCLUDE_DIRECTORIES (${UUID_INCLUDE_DIRS})
ENDIF (UNIX)

# ============================================================================
# build example
# ============================================================================
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_SKIP_BUILD_RPATH FALSE)

# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

SET(CMAKE_INSTALL_RPATH "\$ORIGIN/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_RPATH "\$ORIGIN/${CMAKE_INSTALL_LIBDIR}")

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

ADD_EXECUTABLE (example ${CMAKE_CURRENT_SOURCE_DIR}/example.cpp)
add_executable (example)
if (WITH_EXPERIMENTAL)
target_compile_definitions(example PRIVATE "-DWITH_EXPERIMENTAL")
endif(WITH_EXPERIMENTAL)
target_sources(example PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/example.cpp
${CMAKE_CURRENT_SOURCE_DIR}/HdfProxyFactoryExample.h
${CMAKE_CURRENT_SOURCE_DIR}/HdfProxyExample.h)

target_include_directories (example PRIVATE ${FESAPI_ROOT_DIR}/src/)

ADD_DEPENDENCIES (example ${CPP_LIBRARY_NAME})
TARGET_LINK_LIBRARIES (example ${CPP_LIBRARY_NAME})
IF (WIN32)
if (WIN32)
SET_TARGET_PROPERTIES (example PROPERTIES LINK_FLAGS "/INCREMENTAL:NO")
SET_TARGET_PROPERTIES (example PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${FESAPI_BINARY_DIR})
ENDIF (WIN32)
endif (WIN32)

# The value of DEBUG_POSTFIX property is initialized when the target is created to the value of the variable CMAKE_<CONFIG>_POSTFIX
# except for executable targets because earlier CMake versions which did not use this variable for executables.
Expand Down
Loading

0 comments on commit 6c6d511

Please sign in to comment.