diff --git a/CMakeLists.txt b/CMakeLists.txt index a6e30f13..ef2b3f62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,12 +391,11 @@ if (WIN32) add_linker_flag_if_supported(-Wl,--high-entropy-va LD_SECURITY_FLAGS) endif() +add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS) +add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS) if(STATIC) if(MINGW) add_linker_flag_if_supported(-static STATIC_FLAGS) - else() - add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS) - add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS) endif() endif()