diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:32:36 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:32:36 -0700 |
commit | 67cc20d0041a32bee12bd9eb20ae218f91b73f77 (patch) | |
tree | d7e1b94bd15c30efd57cf9036f5fe89306b6bba0 /CMakeLists.txt | |
parent | 7751bd4c715ea8478113e34b49b5a794a4642e8e (diff) | |
download | zlib-1.2.4-pre1.tar.gz zlib-1.2.4-pre1.tar.bz2 zlib-1.2.4-pre1.zip |
zlib 1.2.4-pre1v1.2.4-pre1
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b129ef2..7eefa49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -66,17 +66,19 @@ if(MSVC) | |||
66 | endif() | 66 | endif() |
67 | 67 | ||
68 | if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) | 68 | if(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 | 69 | # If we're doing an out of source build and the user has a zconf.h |
70 | # in their source tree... | 70 | # in their source tree... |
71 | if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h) | 71 | if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h) |
72 | message(FATAL_ERROR "You must remove zconf.h from the source tree. This f | 72 | message(FATAL_ERROR |
73 | ile is generated by the ./configure script shipped with zlib. CMake generates t | 73 | "You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h " |
74 | his file for you automatically in the build directory") | 74 | "from the source tree. This file is included with zlib " |
75 | "but CMake generates this file for you automatically " | ||
76 | "in the build directory.") | ||
75 | endif() | 77 | endif() |
76 | endif() | 78 | endif() |
77 | 79 | ||
78 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.in | 80 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein |
79 | ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h @ONLY) | 81 | ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) |
80 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) | 82 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
81 | 83 | ||
82 | 84 | ||
@@ -85,7 +87,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) | |||
85 | #============================================================================ | 87 | #============================================================================ |
86 | 88 | ||
87 | set(ZLIB_PUBLIC_HDRS | 89 | set(ZLIB_PUBLIC_HDRS |
88 | zconf.h | 90 | ${CMAKE_CURRENT_BINARY_DIR}/zconf.h |
89 | zlib.h | 91 | zlib.h |
90 | ) | 92 | ) |
91 | set(ZLIB_PRIVATE_HDRS | 93 | set(ZLIB_PRIVATE_HDRS |
@@ -129,6 +131,7 @@ if(MINGW) | |||
129 | COMMAND windres.exe | 131 | COMMAND windres.exe |
130 | -D GCC_WINDRES | 132 | -D GCC_WINDRES |
131 | -I ${CMAKE_CURRENT_SOURCE_DIR} | 133 | -I ${CMAKE_CURRENT_SOURCE_DIR} |
134 | -I ${CMAKE_CURRENT_BINARY_DIR} | ||
132 | -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj | 135 | -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj |
133 | -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) | 136 | -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) |
134 | set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) | 137 | set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) |