From df3b26506453866c608bc0155293716a17a351b9 Mon Sep 17 00:00:00 2001 From: Tomas Berger Date: Mon, 24 Aug 2020 15:46:51 +0200 Subject: [PATCH] Add option to CMakeLists.txt to disable renaming of zconf.h. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ca10ab1..fbe4f1fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)