diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:27:26 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:27:26 -0700 |
commit | 7751bd4c715ea8478113e34b49b5a794a4642e8e (patch) | |
tree | 537ba82b3780f933c2f17028febd6fe3a2332190 /CMakeLists.txt | |
parent | e0ff940e1adb68d3575705ebf1546d9f07ad3b4a (diff) | |
download | zlib-7751bd4c715ea8478113e34b49b5a794a4642e8e.tar.gz |
zlib 1.2.3.9v1.2.3.9
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
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() # # Check for unistd.h # -check_include_file(unistd.h HAVE_UNISTD_H) +check_include_file(unistd.h Z_HAVE_UNISTD_H) # # Check for errno.h @@ -65,6 +65,21 @@ if(MSVC) add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) endif() +if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) + # If we're doing an out of source build and the user has a zconf.h + # in their source tree... + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h) + message(FATAL_ERROR "You must remove zconf.h from the source tree. This f +ile is generated by the ./configure script shipped with zlib. CMake generates t +his file for you automatically in the build directory") + endif() +endif() + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h @ONLY) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + + #============================================================================ # zlib #============================================================================ @@ -90,7 +105,6 @@ set(ZLIB_SRCS crc32.c deflate.c gzclose.c - gzio.c gzlib.c gzread.c gzwrite.c |