Link pthreads when linking statically.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
1686434440
commit
2c7082a728
|
@ -21,6 +21,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
add_link_options(-fuse-ld=lld)
|
add_link_options(-fuse-ld=lld)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
SET(CMAKE_SYSTEM_NAME Windows)
|
SET(CMAKE_SYSTEM_NAME Windows)
|
||||||
ADD_DEFINITIONS(-D WINDOWS=1)
|
ADD_DEFINITIONS(-D WINDOWS=1)
|
||||||
|
@ -127,7 +130,7 @@ endif ()
|
||||||
|
|
||||||
if (STATICC)
|
if (STATICC)
|
||||||
message(STATUS "Linking C library statically")
|
message(STATUS "Linking C library statically")
|
||||||
SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++)
|
SET(_LINKS ${_LINKS} -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(pkmnLib PUBLIC ${_LINKS})
|
target_link_libraries(pkmnLib PUBLIC ${_LINKS})
|
||||||
|
|
Loading…
Reference in New Issue