HDFFV-1045 gcc static must be link flags

This commit is contained in:
Allen Byrne 2019-07-18 10:45:42 -05:00
parent 17474a232f
commit bdfb553c4c

View File

@ -114,8 +114,12 @@ if (BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_CPP_LIBSH_TARGET}
PUBLIC ${HDF5_LIBSH_TARGET}
PRIVATE "$<$<PLATFORM_ID:MinGW>:-static -static-libgcc -static-libstdc++ -dynamic>"
)
if (MINGW)
target_link_options (${HDF5_CPP_LIBSH_TARGET}
PUBLIC "-static -static-libgcc -static-libstdc++ -dynamic>"
)
endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_CPP_LIBSH_TARGET} ${HDF5_CPP_LIB_NAME} SHARED "CXX")
set_target_properties (${HDF5_CPP_LIBSH_TARGET} PROPERTIES FOLDER libraries/cpp)