diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f0e074a..e546ea4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -49,7 +49,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "MINGW") | |||
49 | set(BUILD_NC false) | 49 | set(BUILD_NC false) |
50 | endif() | 50 | endif() |
51 | 51 | ||
52 | if(MSVC) | 52 | if(WIN32) |
53 | set(BUILD_NC false) | 53 | set(BUILD_NC false) |
54 | endif() | 54 | endif() |
55 | 55 | ||
@@ -80,14 +80,17 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") | |||
80 | add_definitions(-Wno-pointer-sign) | 80 | add_definitions(-Wno-pointer-sign) |
81 | endif() | 81 | endif() |
82 | 82 | ||
83 | if(MSVC) | 83 | if(WIN32) |
84 | add_definitions(-Dinline=__inline) | ||
85 | add_definitions(-Drestrict) | 84 | add_definitions(-Drestrict) |
86 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) | 85 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) |
87 | add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) | 86 | add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) |
88 | add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS) | 87 | add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS) |
89 | add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501) | 88 | add_definitions(-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0501) |
90 | add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT) | 89 | add_definitions(-DCPPFLAGS -DOPENSSL_NO_SPEED -DNO_SYSLOG -DNO_CRYPT) |
90 | endif() | ||
91 | |||
92 | if(MSVC) | ||
93 | add_definitions(-Dinline=__inline) | ||
91 | 94 | ||
92 | set(MSVC_DISABLED_WARNINGS_LIST | 95 | set(MSVC_DISABLED_WARNINGS_LIST |
93 | "C4057" # C4057: 'initializing' : 'unsigned char *' differs in | 96 | "C4057" # C4057: 'initializing' : 'unsigned char *' differs in |
@@ -143,7 +146,7 @@ if(HAVE_STRNDUP) | |||
143 | add_definitions(-DHAVE_STRNDUP) | 146 | add_definitions(-DHAVE_STRNDUP) |
144 | endif() | 147 | endif() |
145 | 148 | ||
146 | if(MSVC) | 149 | if(WIN32) |
147 | set(HAVE_STRNLEN true) | 150 | set(HAVE_STRNLEN true) |
148 | add_definitions(-DHAVE_STRNLEN) | 151 | add_definitions(-DHAVE_STRNLEN) |
149 | else() | 152 | else() |
@@ -237,7 +240,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "SunOS") | |||
237 | set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket) | 240 | set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket) |
238 | endif() | 241 | endif() |
239 | 242 | ||
240 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|MINGW|CYGWIN)" OR MSVC)) | 243 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|CYGWIN)")) |
241 | set(BUILD_SHARED true) | 244 | set(BUILD_SHARED true) |
242 | endif() | 245 | endif() |
243 | 246 | ||