Potential fix for linker issues.
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2020-12-11 12:34:23 +01:00
parent 9d4da515bf
commit 092fb9b9ce
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 8 additions and 6 deletions

View File

@ -128,15 +128,17 @@ if (NOT WINDOWS)
set(_LINKS ${_LINKS} -ldw)
endif ()
if (STATICC)
message(STATUS "Linking C library statically")
SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread)
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(pkmnLib PUBLIC ${_LINKS} Threads::Threads)
if (STATICC)
message(STATUS "Linking C library statically")
SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread)
else()
SET(_LINKS ${_LINKS} Threads::Threads)
endif()
target_link_libraries(pkmnLib PUBLIC ${_LINKS})
if (TESTS)
# Create Test executable