From 214e75b992a208d655fc04a993a2663cd49987f1 Mon Sep 17 00:00:00 2001
From: Deukhoofd <Deukhoofd@gmail.com>
Date: Fri, 11 Feb 2022 14:36:39 +0100
Subject: [PATCH] Link pthread statically again

---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2312d7c..4f7a260 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -204,8 +204,8 @@ endif ()
 if (STATICC)
     set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
     message(STATUS "Linking C library statically")
-    set(_LINKS ${_LINKS} -static-libstdc++ -Wl,-Bstatic -lgcc -lstdc++ -Wl,-Bdynamic)
-    SET(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lgcc -lstdc++ -Wl,-Bdynamic)
+    set(_LINKS ${_LINKS} -static-libstdc++ -Wl,-Bstatic -lgcc -lstdc++ -lpthread -Wl,-Bdynamic)
+    SET(_TESTLINKS ${_TESTLINKS} -Wl,-Bstatic -lgcc -lstdc++ -lpthread -Wl,-Bdynamic)
 endif ()
 
 target_link_libraries(pkmnLib PRIVATE ${_LINKS})