diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c00aa6..62bf5c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,8 +86,13 @@ endif() if (STATICC) message("Linking dependencies statically.") set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed") - set(LINKS -static-libgcc -static-libstdc++ -Wl,-Bstatic -lm -lstdc++ -lpthread -Wl,-Bdynamic ${LINKS}) + set(LINKS -static-libgcc -static-libstdc++ ${LINKS}) endif(STATICC) + +if (WINDOWS) + set(LINKS ${LINKS} -Wl,-Bstatic -lm -lstdc++ -lpthread -Wl,-Bdynamic) +endif() + target_link_libraries(Arbutils ${LINKS}) if (ARBUTILS_TESTS)