summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2011-10-08 17:30:27 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-10-08 17:30:27 +0100
commit4726bfb50c95c3090e4c3bddf5981a4562f9f600 (patch)
treecd5056e520d1c3ef74f19195472c5791c5c187b5
parent1dc11cd6b5ef9f6a2aede394f60742b76ff830fd (diff)
Fix MSVC build.
-rw-r--r--thirdparty/zlib/CMakeLists.txt9
-rw-r--r--thirdparty/zlib/zconf.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/thirdparty/zlib/CMakeLists.txt b/thirdparty/zlib/CMakeLists.txt
index 1721574..55423c8 100644
--- a/thirdparty/zlib/CMakeLists.txt
+++ b/thirdparty/zlib/CMakeLists.txt
@@ -1,6 +1,11 @@
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories (${CMAKE_CURRENT_SOURCE_DIR})
-add_definitions(-DNO_VIZ)
+add_definitions (-DNO_VIZ)
+
+# adjust warnings
+if (MSVC)
+ add_definitions (-wd4131) # uses old-style declarator
+endif ()
add_library (z_bundled STATIC
adler32.c
diff --git a/thirdparty/zlib/zconf.h b/thirdparty/zlib/zconf.h
index b234387..ced649e 100644
--- a/thirdparty/zlib/zconf.h
+++ b/thirdparty/zlib/zconf.h
@@ -356,7 +356,7 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
-#if 1 /* was set to #if 1 by ./configure */
+#if !defined(_MSC_VER)
# define Z_HAVE_UNISTD_H
#endif