summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:26 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:26 -0700
commit7751bd4c715ea8478113e34b49b5a794a4642e8e (patch)
tree537ba82b3780f933c2f17028febd6fe3a2332190 /CMakeLists.txt
parente0ff940e1adb68d3575705ebf1546d9f07ad3b4a (diff)
downloadzlib-1.2.3.9.tar.gz
zlib-1.2.3.9.tar.bz2
zlib-1.2.3.9.zip
zlib 1.2.3.9v1.2.3.9
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 16 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ea0fa99..b129ef2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,7 +50,7 @@ endif()
50# 50#
51# Check for unistd.h 51# Check for unistd.h
52# 52#
53check_include_file(unistd.h HAVE_UNISTD_H) 53check_include_file(unistd.h Z_HAVE_UNISTD_H)
54 54
55# 55#
56# Check for errno.h 56# Check for errno.h
@@ -65,6 +65,21 @@ if(MSVC)
65 add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) 65 add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
66endif() 66endif()
67 67
68if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
69 # If we're doing an out of source build and the user has a zconf.h
70 # in their source tree...
71 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
72 message(FATAL_ERROR "You must remove zconf.h from the source tree. This f
73ile is generated by the ./configure script shipped with zlib. CMake generates t
74his file for you automatically in the build directory")
75 endif()
76endif()
77
78configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.in
79 ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h @ONLY)
80include_directories(${CMAKE_CURRENT_BINARY_DIR})
81
82
68#============================================================================ 83#============================================================================
69# zlib 84# zlib
70#============================================================================ 85#============================================================================
@@ -90,7 +105,6 @@ set(ZLIB_SRCS
90 crc32.c 105 crc32.c
91 deflate.c 106 deflate.c
92 gzclose.c 107 gzclose.c
93 gzio.c
94 gzlib.c 108 gzlib.c
95 gzread.c 109 gzread.c
96 gzwrite.c 110 gzwrite.c