|
|
|
|
|
|
|
|
# Check for socket functions |
|
|
# Check for socket functions |
|
|
if(WIN32) |
|
|
if(WIN32) |
|
|
# check_function_exists() cannot handle stdcall, so just define things |
|
|
# check_function_exists() cannot handle stdcall, so just define things |
|
|
set(HAVE_INET_ATON 1) |
|
|
|
|
|
set(HAVE_GETADDRINFO 1) |
|
|
set(HAVE_GETADDRINFO 1) |
|
|
else() |
|
|
else() |
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") |
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") |
|
|
set(CMAKE_REQUIRED_LIBRARIES socket) |
|
|
set(CMAKE_REQUIRED_LIBRARIES socket) |
|
|
endif() |
|
|
endif() |
|
|
check_function_exists(inet_aton HAVE_INET_ATON) |
|
|
|
|
|
check_function_exists(getaddrinfo HAVE_GETADDRINFO) |
|
|
check_function_exists(getaddrinfo HAVE_GETADDRINFO) |
|
|
set(CMAKE_REQUIRED_LIBRARIES) |
|
|
set(CMAKE_REQUIRED_LIBRARIES) |
|
|
endif() |
|
|
endif() |