Link libsyncthing to pthread library via `-pthread`
That's preferred over just specifying the library path because it invokes additional behavior like adding `-D_REENTRANT` which might be required.
This commit is contained in:
parent
55e59d20c0
commit
567e176d48
|
@ -214,7 +214,10 @@ set_property(TARGET syncthinginternal PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${
|
|||
if (WIN32)
|
||||
set(SYNCTHING_INTERNAL_LIBS ws2_32 winmm)
|
||||
elseif (UNIX)
|
||||
set(SYNCTHING_INTERNAL_LIBS pthread)
|
||||
set_property(
|
||||
TARGET syncthinginternal
|
||||
APPEND
|
||||
PROPERTY INTERFACE_LINK_OPTIONS "-pthread")
|
||||
endif ()
|
||||
foreach (LIBRARY ${SYNCTHING_INTERNAL_LIBS})
|
||||
find_library(SYNCTHING_INTERNAL_LIBRARY_PATH_${LIBRARY} ${LIBRARY})
|
||||
|
|
Loading…
Reference in New Issue