diff options
author | Satoshi Yasushima <yasushima-gd@users.noreply.github.com> | 2016-08-25 18:17:12 +0900 |
---|---|---|
committer | Satoshi Yasushima <yasushima-gd@users.noreply.github.com> | 2016-08-25 18:17:12 +0900 |
commit | 971892766db26560f7cc34b78750cac149867425 (patch) | |
tree | 0f79d8a26a3519d48c25cac77d2b71faf5c33fc5 /CMakeLists.txt | |
parent | 8edd509e2c42219ec1104913e6597332b9e5f2e9 (diff) | |
download | portable-971892766db26560f7cc34b78750cac149867425.tar.gz portable-971892766db26560f7cc34b78750cac149867425.tar.bz2 portable-971892766db26560f7cc34b78750cac149867425.zip |
build MinGW on CMake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f0e074a..f4300dd 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() |