Add option to CMakeLists.txt to disable renaming of zconf.h.

This commit is contained in:
Tomas Berger 2020-08-24 15:46:51 +02:00 committed by Mark Adler
parent d4eaa1d939
commit df3b265064

View File

@ -65,7 +65,8 @@ if(MSVC)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
option(RENAME_ZCONF "Rename the zconf when building out of source" ON)
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND RENAME_ZCONF)
# 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)