Only statically link libm and pthread on Windows
This commit is contained in:
parent
923483e9b9
commit
7532e4d94d
|
@ -86,8 +86,13 @@ endif()
|
||||||
if (STATICC)
|
if (STATICC)
|
||||||
message("Linking dependencies statically.")
|
message("Linking dependencies statically.")
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
|
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)
|
endif(STATICC)
|
||||||
|
|
||||||
|
if (WINDOWS)
|
||||||
|
set(LINKS ${LINKS} -Wl,-Bstatic -lm -lstdc++ -lpthread -Wl,-Bdynamic)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(Arbutils ${LINKS})
|
target_link_libraries(Arbutils ${LINKS})
|
||||||
|
|
||||||
if (ARBUTILS_TESTS)
|
if (ARBUTILS_TESTS)
|
||||||
|
|
Loading…
Reference in New Issue