Skip to content

Commit

Permalink
fix multiple definitions with MinGW
Browse files Browse the repository at this point in the history
Avoid multiple definitions if shared and inline with MinGW
  • Loading branch information
SpaceIm committed Mar 30, 2020
1 parent 4e9a255 commit 43051eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ add_subdirectory(src)

if(BUILD_SHARED_LIBS)
target_compile_definitions(geos
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:GEOS_DLL_EXPORT>)
PRIVATE $<IF:$<CXX_COMPILER_ID:MSVC>,GEOS_DLL_EXPORT,DLL_EXPORT>)

set_target_properties(geos PROPERTIES VERSION ${GEOS_VERSION})
set_target_properties(geos PROPERTIES SOVERSION ${GEOS_VERSION})
Expand All @@ -238,7 +238,7 @@ target_link_libraries(geos_c PRIVATE geos)

if(BUILD_SHARED_LIBS)
target_compile_definitions(geos_c
PRIVATE $<$<CXX_COMPILER_ID:MSVC>:GEOS_DLL_EXPORT>)
PRIVATE $<IF:$<CXX_COMPILER_ID:MSVC>,GEOS_DLL_EXPORT,DLL_EXPORT>)

set_target_properties(geos_c PROPERTIES VERSION ${CAPI_VERSION})
if(NOT WIN32)
Expand Down

0 comments on commit 43051eb

Please sign in to comment.