Fix cmake linux build: dbus-1 and dbus-internal require to link to rt library
authorRalf Habacker <ralf.habacker@sag.eu>
Mon, 4 Mar 2013 14:24:19 +0000 (15:24 +0100)
committerRalf Habacker <ralf.habacker@freenet.de>
Mon, 4 Mar 2013 17:26:06 +0000 (18:26 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
cmake/dbus/CMakeLists.txt

index d09e63df3a0f351fdc98b7dd9743c69b8ce955d5..8a4017166f3dbcbdf0ae2a1a40f1b1725d5c7bed 100644 (file)
@@ -267,7 +267,7 @@ if(WIN32)
         target_link_libraries(dbus-1 ws2_32 advapi32 netapi32)
     endif(WINCE)
 else(WIN32)
-    target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT})
+    target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt)
 endif(WIN32)
 
 install_targets(/lib dbus-1 )
@@ -292,7 +292,7 @@ if(WIN32)
         target_link_libraries(dbus-internal ws2_32 advapi32 netapi32)
     endif(WINCE)
 else(WIN32)
-    target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT})
+    target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT} rt)
 endif(WIN32)
 
 if (DBUS_BUILD_TESTS)