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-67cc20d0041a32bee12bd9eb20ae218f91b73f77.tar.gz |
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) 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") + # 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 ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h " + "from the source tree. This file is included with zlib " + "but CMake generates this 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) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -85,7 +87,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) #============================================================================ set(ZLIB_PUBLIC_HDRS - zconf.h + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h zlib.h ) set(ZLIB_PRIVATE_HDRS @@ -129,6 +131,7 @@ if(MINGW) COMMAND windres.exe -D GCC_WINDRES -I ${CMAKE_CURRENT_SOURCE_DIR} + -I ${CMAKE_CURRENT_BINARY_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) |