Commit b47f4c22 authored by Simon McVittie's avatar Simon McVittie

On Unix, link libdbus to a platform-specific threading library

On Linux, this is libpthread; on other Unixes, in principle it might be
called libpthreads or libthreads or something.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47237Signed-off-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker's avatarRalf Habacker <ralf.habacker@freenet.de>
parent efddba53
...@@ -83,6 +83,8 @@ option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" ON) ...@@ -83,6 +83,8 @@ option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" ON)
if(NOT WIN32) if(NOT WIN32)
option (DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON) option (DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON)
set (CMAKE_THREAD_PREFER_PTHREAD ON)
include (FindThreads)
endif(NOT WIN32) endif(NOT WIN32)
#AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE) #AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
......
...@@ -266,6 +266,8 @@ if(WIN32) ...@@ -266,6 +266,8 @@ if(WIN32)
else(WINCE) else(WINCE)
target_link_libraries(dbus-1 ws2_32 advapi32 netapi32) target_link_libraries(dbus-1 ws2_32 advapi32 netapi32)
endif(WINCE) endif(WINCE)
else(WIN32)
target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT})
endif(WIN32) endif(WIN32)
install_targets(/lib dbus-1 ) install_targets(/lib dbus-1 )
...@@ -289,6 +291,8 @@ if(WIN32) ...@@ -289,6 +291,8 @@ if(WIN32)
else(WINCE) else(WINCE)
target_link_libraries(dbus-internal ws2_32 advapi32 netapi32) target_link_libraries(dbus-internal ws2_32 advapi32 netapi32)
endif(WINCE) endif(WINCE)
else(WIN32)
target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT})
endif(WIN32) endif(WIN32)
if (DBUS_BUILD_TESTS) if (DBUS_BUILD_TESTS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment