aboutsummaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-07-13 15:10:19 +0200
committerAndreas Schneider <asn@cynapses.org>2010-08-03 18:13:59 +0200
commit296f6a9217cb7afa080edb0efc16d309db77c06b (patch)
tree85395c82c66a1292d99a751a2a94f65b940ba8fb /ConfigureChecks.cmake
parentd688ed2553cd756d9e0bdacd62145d1e9e1f1367 (diff)
downloadlibssh-296f6a9217cb7afa080edb0efc16d309db77c06b.tar.gz
libssh-296f6a9217cb7afa080edb0efc16d309db77c06b.tar.xz
libssh-296f6a9217cb7afa080edb0efc16d309db77c06b.zip
build: Fixed the Windows preprocessor macros and defines.
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake13
1 files changed, 8 insertions, 5 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 2506546..4594153 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -16,9 +16,9 @@ set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
set(BINARYDIR ${CMAKE_BINARY_DIR})
set(SOURCEDIR ${CMAKE_SOURCE_DIR})
-if(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
check_c_compiler_flag("-fvisibility=hidden" WITH_VISIBILITY_HIDDEN)
-endif(CMAKE_COMPILER_IS_GNUCC)
+endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
# HEADER FILES
check_include_file(argp.h HAVE_ARGP_H)
@@ -36,11 +36,14 @@ if (WIN32)
endif (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H)
check_function_exists(vsnprintf HAVE_VSNPRINTF)
- if(NOT HAVE_VSNPRINTF)
+ check_function_exists(snprintf HAVE_SNPRINTF)
+
+ if (WIN32)
check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S)
check_function_exists(_vsnprintf HAVE__VSNPRINTF)
- endif(NOT HAVE_VSNPRINTF)
-
+ check_function_exists(_snprintf HAVE__SNPRINTF)
+ check_function_exists(_snprintf_s HAVE__SNPRINTF_S)
+ endif (WIN32)
check_function_exists(strncpy HAVE_STRNCPY)
set(HAVE_SELECT TRUE)