]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Rename zconf.h in CMakeLists.txt to move it out of the way.
authorPeter Kuemmel <syntheticpp@gmx.net>
Sat, 17 Mar 2012 18:56:03 +0000 (19:56 +0100)
committerMark Adler <madler@alumni.caltech.edu>
Sun, 18 Mar 2012 04:43:47 +0000 (21:43 -0700)
CMakeLists.txt

index 39530f28dda8a92d0cba7175419345fd2215d775..5b61ea39a7f317210eef1b70f0438667fd08e8b5 100644 (file)
@@ -67,11 +67,11 @@ 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 ${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.")
+        message(STATUS "Renaming")
+        message(STATUS "    ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h")
+        message(STATUS "to 'zconf.h.included' because this file is included with zlib")
+        message(STATUS "but CMake generates it automatically in the build directory.")
+        file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
   endif()
 endif()