0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/cmake/libc-ares.cmake
Tom Hughes 446beebd79 Add cmake build support.
Squashed commit of ca128f7dcd28cbcfba154c8577ed54d4aa71dd02 with
contributions from Mark Constable (markc@renta.net) and Daniel Gröber
(darklord@darkboxed.org).
2010-11-22 13:32:49 -08:00

19 lines
575 B
CMake

if(SHARED_CARES)
find_library(LIBCARES_LIBRARY NAMES cares)
find_path(LIBCARES_INCLUDE_DIR ares.h
PATH_SUFFIXES include
) # Find header
find_package_handle_standard_args(libcares DEFAULT_MSG LIBCARES_LIBRARY LIBCARES_INCLUDE_DIR)
else()
set(cares_arch ${node_arch})
if(${node_arch} MATCHES x86_64)
set(cares_arch x64)
elseif(${node_arch} MATCHES x86)
set(cares_arch ia32)
endif()
add_subdirectory(deps/c-ares)
set(LIBCARES_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/deps/c-ares ${CMAKE_SOURCE_DIR}/deps/c-ares/${node_platform}-${cares_arch})
endif()