diff --git a/CMakeLists.txt b/CMakeLists.txt index 06554aa..428ba31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,8 +132,8 @@ if (WINDOWS) if (SHARED) set_target_properties(pkmnLib PROPERTIES SUFFIX ".dll") endif (SHARED) - set(_LINKS ${_LINKS} -Wl,-Bstatic -lws2_32 -Wl,-Bdynamic) - set(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lws2_32 -Wl,-Bdynamic) + set(_LINKS ${_LINKS} -Wl,-Bstatic -lws2_32 -lpthread -Wl,-Bdynamic) + set(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lws2_32 -lpthread -Wl,-Bdynamic) endif (WINDOWS) if (NOT WINDOWS) @@ -144,9 +144,9 @@ if (STATICC) set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed") message(STATUS "Linking C library statically") 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 () - SET(_LINKS ${_LINKS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive) + SET(_LINKS ${_LINKS} -Wl,--whole-archive -Wl,--no-whole-archive) endif () target_link_libraries(pkmnLib PRIVATE ${_LINKS})