diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cb79f3..09129a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,10 +287,13 @@ if (WIN32) endif() if(STATIC) -# add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS) -# add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS) if(MINGW) add_linker_flag_if_supported(-static STATIC_FLAGS) + elseif (NOT (APPLE OR FREEBSD OR OPENBSD OR DRAGONFLY)) + if(NOT "${ARCH}" STREQUAL "armv7-a") + add_linker_flag_if_supported(-static-libgcc STATIC_FLAGS) + add_linker_flag_if_supported(-static-libstdc++ STATIC_FLAGS) + endif() endif() endif()