Potential fix for linker issues.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
9d4da515bf
commit
092fb9b9ce
|
@ -128,15 +128,17 @@ if (NOT WINDOWS)
|
||||||
set(_LINKS ${_LINKS} -ldw)
|
set(_LINKS ${_LINKS} -ldw)
|
||||||
endif ()
|
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)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
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)
|
if (TESTS)
|
||||||
# Create Test executable
|
# Create Test executable
|
||||||
|
|
Loading…
Reference in New Issue