summaryrefslogtreecommitdiffstats
path: root/c++/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:21:47 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:21:47 (GMT)
commitd3fdcd8a680ad0f8b21304b35e8564b774a88ef0 (patch)
tree7eaf482abb38de0349b7844ed6f9e04de88f438d /c++/src/CMakeLists.txt
parent6add0919d1dd737a7d9a2da25079d761a85f282e (diff)
parente19b0302cc38d1850ada7a00431511343cddc8a6 (diff)
downloadhdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.zip
hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.gz
hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.bz2
Merge pull request #1807 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'e19b0302cc38d1850ada7a00431511343cddc8a6': (31 commits) HDFFV-10845 update note Correct format of drive check Use generator expr to get correct name HDFFV-10845 Allow mingw to find functionality HDFFV-10845 fix comment syntax HDFFV-10845 Windows drive can only goto Z HDFFV-10845 make flags private Correct java load library name access Correct syntax Fix typo Correct OUTPUT_NAME usage CMake generator expr cannot be used in get_property cmd HDFFV-1045 gcc static must be link flags HDFFV-10845 quote multiple strings in cmake link command HDFFV-10845 update mingw cmake changes Add missing target root path, check other export macro HDFFV-10845 skip test if CMake command doesn't support ignore EOL HDFFV-10845 copy files with windows EOL HDFFV-10845 separate test used by copy windows files HDFFV-10845 mingw needs special windows reference files ...
Diffstat (limited to 'c++/src/CMakeLists.txt')
-rw-r--r--c++/src/CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index b141a5e..2a92ed2 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -112,7 +112,14 @@ if (BUILD_SHARED_LIBS)
PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
)
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED)
- target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
+ target_link_libraries (${HDF5_CPP_LIBSH_TARGET}
+ PUBLIC ${HDF5_LIBSH_TARGET}
+ )
+ if (MINGW)
+ target_link_options (${HDF5_CPP_LIBSH_TARGET}
+ PRIVATE -static-libgcc -static-libstdc++
+ )
+ 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)
@@ -188,7 +195,7 @@ install (
COMPONENT cpplibraries
)
-if (NOT WIN32)
+if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in