Browse Source

Fixed socklen_t test unix compatible.



git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4326 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.1.90
Henrik Andersson 13 years ago
parent
commit
e1fd8e15f9
2 changed files with 9 additions and 2 deletions
  1. 8
    2
      CMakeLists.txt
  2. 1
    0
      config.h.cmake.in

+ 8
- 2
CMakeLists.txt View File

@@ -116,10 +116,16 @@ endif()
# Generate config.h
include(CheckIncludeFiles)
include(CheckFunctionExists)
set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
include(CheckTypeSize)
if(WIN32)
set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
endif()
check_function_exists(inet_aton HAVE_INET_ATON)
check_function_exists(inet_ntop HAVE_INET_NTOP)
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
check_type_size(socklen_t SOCKLEN_T)

set(CMAKE_EXTRA_INCLUDE_FILES)
set(CMAKE_REQUIRED_LIBRARIES)
check_function_exists(snprintf HAVE_SNPRINTF)

+ 1
- 0
config.h.cmake.in View File

@@ -1,3 +1,4 @@
#cmakedefine HAVE_SOCKLEN_T
#cmakedefine HAVE_INET_ATON
#cmakedefine HAVE_INET_NTOP
#cmakedefine HAVE_SNPRINTF

Loading…
Cancel
Save