diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-07-19 14:56:34 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-07-19 15:05:26 +0000 |
commit | bf79fdbb43d8f3e93ce9eea67bff8d17dde29b10 (patch) | |
tree | 6661e44de47e8e0e4e81ee96206df230ede7ae17 /CMakeLists.txt | |
parent | 7c05b3a85ecdaae0c6e786ce6946835c3219fca4 (diff) |
Link -lsocket and -lnsl for socket functions on Solaris.
Also, added some #defines to make symbols visible that are in BSD but not
in UNIX. Solaris needs these, since it's fairly strict with its symbol
visibility in system headers.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c3f3d52d..921d0140 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -309,11 +309,22 @@ if(CMAKE_THREAD_LIBS_INIT) | |||
309 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} ${CMAKE_THREAD_LIBS_INIT}) | 309 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} ${CMAKE_THREAD_LIBS_INIT}) |
310 | endif() | 310 | endif() |
311 | 311 | ||
312 | |||
313 | if(NSL_LIBRARIES) | ||
314 | set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${NSL_LIBRARIES}) | ||
315 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lnsl) | ||
316 | endif() | ||
317 | |||
312 | if(RT_LIBRARIES) | 318 | if(RT_LIBRARIES) |
313 | set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${RT_LIBRARIES}) | 319 | set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${RT_LIBRARIES}) |
314 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lrt) | 320 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lrt) |
315 | endif() | 321 | endif() |
316 | 322 | ||
323 | if(SOCKET_LIBRARIES) | ||
324 | set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${SOCKET_LIBRARIES}) | ||
325 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lsocket) | ||
326 | endif() | ||
327 | |||
317 | if(WIN32) | 328 | if(WIN32) |
318 | set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ws2_32 iphlpapi) | 329 | set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ws2_32 iphlpapi) |
319 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lws2_32 -liphlpapi) | 330 | set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lws2_32 -liphlpapi) |