Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorTom Hughes <tom.hughes@palm.com>2010-11-29 21:02:06 +0300
committerRyan Dahl <ry@tinyclouds.org>2010-12-02 21:36:10 +0300
commite681abe5cbcb58fb71baad1190135961fe39ebc7 (patch)
treeb2bdc3ce6c0a640413c56e0c2ca2f5b476972fdc /deps
parentcf1811a6d3f19e8922fa205c77e216ce7981c5e3 (diff)
cmake: solaris fixes.
Diffstat (limited to 'deps')
-rw-r--r--deps/c-ares/CMakeLists.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/deps/c-ares/CMakeLists.txt b/deps/c-ares/CMakeLists.txt
index 98be04a3762..7bbb95b879c 100644
--- a/deps/c-ares/CMakeLists.txt
+++ b/deps/c-ares/CMakeLists.txt
@@ -2,5 +2,21 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${node_platform}-${cares_arch})
add_definitions(-DHAVE_CONFIG_H=1)
+include(CheckLibraryExists)
+check_library_exists(socket socket "" HAVE_SOCKET_LIB)
+check_library_exists(nsl gethostbyname "" HAVE_NSL_LIB)
+
file(GLOB lib_sources *.c)
-add_library(cares ${lib_sources}) \ No newline at end of file
+add_library(cares ${lib_sources})
+
+if(${HAVE_SOCKET_LIB})
+ set(cares_libs ${cares_libs} socket)
+endif()
+
+if(${HAVE_NSL_LIB})
+ set(cares_libs ${cares_libs} nsl)
+endif()
+
+if(cares_libs)
+ target_link_libraries(cares ${cares_libs})
+endif()