aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c-ares/CMakeLists.txt
blob: 87c86fa04518477ff6e482436dfe5a8d7bfd6217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
string(TOLOWER ${CMAKE_SYSTEM_NAME} cares_system_name)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/c-ares)

if(${cares_system_name} MATCHES windows)
  add_definitions(-DCARES_STATICLIB=1)
  add_definitions(-DWIN32_LEAN_AND_MEAN=1)
else()
  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/config_${cares_system_name})
  add_definitions(-DHAVE_CONFIG_H=1)
endif()

file(GLOB lib_sources ../../third_party/c-ares/*.c)
add_library(cares ${lib_sources})