Revert "Work on removing pthreads references"

This reverts commit c58eb2d831.
This commit is contained in:
Deukhoofd 2022-02-11 13:42:28 +01:00
parent 0eefcf0f1f
commit 1f29d41b08
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 6 additions and 2 deletions

View File

@ -167,12 +167,16 @@ if (LINK_STD_STATICALLY)
message(STATUS "Linking std libraries statically")
set(as_LINKS -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++)
if (MSVC)
set(as_LINKS "${as_LINKS}")
set(as_LINKS "${as_LINKS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive")
else()
set(as_LINKS "${as_LINKS}")
set(as_LINKS "${as_LINKS} -Wl,-Bdynamic -lpthread")
endif(MSVC)
message(STATUS "Angelscript LINKS ${as_LINKS}")
target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} ${as_LINKS})
else()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} -lpthread)
endif()
set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION})