mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
CMake: Move -lpthread to the very end to fix Linux linking
This commit is contained in:
parent
969f3c2db4
commit
280ed3fc3d
|
@ -726,9 +726,6 @@ set(DEPS ${DEP_JSON} ${DEP_MD5} ${ZLIB_DEP})
|
|||
|
||||
# Libraries
|
||||
set(LIBS ${CRYPTO_LIBRARIES} ${WEBSOCKETS_LIBRARIES} ${ZLIB_LIBRARIES} ${PLATFORM_LIBS})
|
||||
# Add pthreads (on non-Windows) at the end, so that other libraries can depend
|
||||
# on it.
|
||||
list(APPEND LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
# Targets
|
||||
add_library(engine-shared EXCLUDE_FROM_ALL OBJECT ${ENGINE_INTERFACE} ${ENGINE_SHARED} ${ENGINE_UUID_SHARED} ${BASE})
|
||||
|
@ -888,6 +885,10 @@ if(CLIENT)
|
|||
${OGG_LIBRARIES}
|
||||
|
||||
${PLATFORM_CLIENT_LIBS}
|
||||
|
||||
# Add pthreads (on non-Windows) at the end, so that other libraries can depend
|
||||
# on it.
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
if(TARGET_OS STREQUAL "windows")
|
||||
|
@ -1031,7 +1032,13 @@ else()
|
|||
endif()
|
||||
|
||||
# Libraries
|
||||
set(LIBS_SERVER ${LIBS} ${MYSQL_LIBRARIES})
|
||||
set(LIBS_SERVER
|
||||
${LIBS}
|
||||
${MYSQL_LIBRARIES}
|
||||
# Add pthreads (on non-Windows) at the end, so that other libraries can depend
|
||||
# on it.
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
# Target
|
||||
set(TARGET_SERVER ${SERVER_EXECUTABLE})
|
||||
|
|
Loading…
Reference in a new issue