Only link pthread statically on Windows.
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
This commit is contained in:
parent
76b7257fdf
commit
ae3021dd64
|
@ -132,8 +132,8 @@ if (WINDOWS)
|
||||||
if (SHARED)
|
if (SHARED)
|
||||||
set_target_properties(pkmnLib PROPERTIES SUFFIX ".dll")
|
set_target_properties(pkmnLib PROPERTIES SUFFIX ".dll")
|
||||||
endif (SHARED)
|
endif (SHARED)
|
||||||
set(_LINKS ${_LINKS} -Wl,-Bstatic -lws2_32 -Wl,-Bdynamic)
|
set(_LINKS ${_LINKS} -Wl,-Bstatic -lws2_32 -lpthread -Wl,-Bdynamic)
|
||||||
set(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lws2_32 -Wl,-Bdynamic)
|
set(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lws2_32 -lpthread -Wl,-Bdynamic)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
if (NOT WINDOWS)
|
if (NOT WINDOWS)
|
||||||
|
@ -144,9 +144,9 @@ if (STATICC)
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
|
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
|
||||||
message(STATUS "Linking C library statically")
|
message(STATUS "Linking C library statically")
|
||||||
set(_LINKS ${_LINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -lpthread -Wl,-Bdynamic)
|
set(_LINKS ${_LINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -lpthread -Wl,-Bdynamic)
|
||||||
SET(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -lpthread -Wl,-Bdynamic)
|
SET(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lm -lgcc -lstdc++ -Wl,-Bdynamic)
|
||||||
else ()
|
else ()
|
||||||
SET(_LINKS ${_LINKS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
|
SET(_LINKS ${_LINKS} -Wl,--whole-archive -Wl,--no-whole-archive)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(pkmnLib PRIVATE ${_LINKS})
|
target_link_libraries(pkmnLib PRIVATE ${_LINKS})
|
||||||
|
|
Loading…
Reference in New Issue