From 07201543e36fdfe64f8a845ddd3c34e693dba93d Mon Sep 17 00:00:00 2001 From: hyeric Date: Thu, 11 Feb 2016 17:53:45 +0100 Subject: [PATCH] Don't link against rt on Android - Fixes compile issue on Android --- cmake/dbus/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index 1701408..4fdf14e 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -281,7 +281,9 @@ else(WIN32) if(DEFINED DBUS_LIBRARY_REVISION) set_target_properties(dbus-1 PROPERTIES VERSION ${DBUS_LIBRARY_MAJOR}.${DBUS_LIBRARY_AGE}.${DBUS_LIBRARY_REVISION} SOVERSION ${DBUS_LIBRARY_MAJOR}) endif() - target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt) + if(NOT ANDROID) + target_link_libraries(dbus-1 ${CMAKE_THREAD_LIBS_INIT} rt) + endif() endif(WIN32) # Assume that Linux has -Wl,--version-script and other platforms do not @@ -308,7 +310,9 @@ if(WIN32) target_link_libraries(dbus-internal ws2_32 advapi32 netapi32 iphlpapi) endif(WINCE) else(WIN32) - target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT} rt) + if(NOT ANDROID) + target_link_libraries(dbus-internal ${CMAKE_THREAD_LIBS_INIT} rt) + endif() endif(WIN32) if (DBUS_ENABLE_EMBEDDED_TESTS) -- 2.1.4