瀏覽代碼

BUG: No need to link threads libraries when pthreads are not found

Andy Cedilnik 21 年之前
父節點
當前提交
b5bf646e4d
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Utilities/cmxmlrpc/CMakeLists.txt

+ 4 - 1
Utilities/cmxmlrpc/CMakeLists.txt

@@ -97,7 +97,10 @@ IF(WIN32)
 ENDIF(WIN32)
 
 ADD_LIBRARY(cmXMLRPC ${xmlrpc_SRCS})
-TARGET_LINK_LIBRARIES(cmXMLRPC ${CMAKE_EXPAT_LIBRARIES} ${CMAKE_CURL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+TARGET_LINK_LIBRARIES(cmXMLRPC ${CMAKE_EXPAT_LIBRARIES} ${CMAKE_CURL_LIBRARIES})
+IF(HAVE_PTHREADS)
+  TARGET_LINK_LIBRARIES(cmXMLRPC ${CMAKE_THREAD_LIBS_INIT})
+ENDIF(HAVE_PTHREADS)
 
 ADD_EXECUTABLE(xrtest synch_client.c)
 TARGET_LINK_LIBRARIES(xrtest cmXMLRPC)