summaryrefslogtreecommitdiffstats
path: root/c++/examples/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'c++/examples/CMakeLists.txt')
-rw-r--r--c++/examples/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 3035841..c50315f 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -41,7 +41,7 @@ foreach (example ${examples})
else ()
TARGET_C_PROPERTIES (cpp_ex_${example} SHARED)
target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- if (MINGW)
+ if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
target_link_options (${HDF5_CPP_LIBSH_TARGET}
PRIVATE -static-libgcc -static-libstdc++
)
@@ -66,7 +66,7 @@ foreach (example ${tutr_examples})
else ()
TARGET_C_PROPERTIES (cpp_ex_${example} SHARED)
target_link_libraries (cpp_ex_${example} PRIVATE ${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- if (MINGW)
+ if (MINGW AND HDF5_MINGW_STATIC_GCC_LIBS)
target_link_options (${HDF5_CPP_LIBSH_TARGET}
PRIVATE -static-libgcc -static-libstdc++
)