diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2016-08-17 18:43:41 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2016-08-18 14:59:41 +0200 |
commit | 1e43857b3103f84243909063671fb369a99239a5 (patch) | |
tree | f676acbccb0a5c3b9aeae73d7886bf954524f0e6 /cmake | |
parent | 5bb70dd55470affb971a840f1a98275906419557 (diff) |
Fix building with CMake for a Unix platform where functions like recv() are in a separate -lsocket, like QNX.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=94096
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/dbus/CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index 452a9e31..86c40589 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -257,6 +257,9 @@ endif(MSVC_IDE) # for clock_getres() on e.g. GNU/Linux (but not Android) find_library(LIBRT rt) +# for socket() on QNX +find_library(LIBSOCKET socket) + ### Client library add_library(dbus-1 SHARED ${libdbus_SOURCES} @@ -288,6 +291,9 @@ else(WIN32) if(LIBRT) target_link_libraries(dbus-1 ${LIBRT}) endif() + if(LIBSOCKET) + target_link_libraries(dbus-1 ${LIBSOCKET}) + endif() endif(WIN32) # Assume that Linux has -Wl,--version-script and other platforms do not @@ -318,6 +324,9 @@ else(WIN32) if(LIBRT) target_link_libraries(dbus-internal ${LIBRT}) endif() + if(LIBSOCKET) + target_link_libraries(dbus-internal ${LIBSOCKET}) + endif() endif(WIN32) if (DBUS_ENABLE_EMBEDDED_TESTS) |