From 82e93f16bd11d2817006ddf6b5b7b70b6b9c84db Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Fri, 29 Sep 2017 18:07:35 +0300 Subject: [PATCH] Fix #228 --- plugins/zlib-ng/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/zlib-ng/CMakeLists.txt b/plugins/zlib-ng/CMakeLists.txt index d09b824..00dafb2 100644 --- a/plugins/zlib-ng/CMakeLists.txt +++ b/plugins/zlib-ng/CMakeLists.txt @@ -8,11 +8,6 @@ function(generate_cmakein input output) file(WRITE "${output}" "${output_data}") endfunction(generate_cmakein) -generate_cmakein("${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng/zconf.h.in" "${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein") - -configure_file( ${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein - ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) - ## End copied from zlib-ng include (SquashPlugin) @@ -42,3 +37,10 @@ squash_plugin( EMBED_COMPILER_FLAGS -Wno-shift-negative-value) list (APPEND zlibng_sources ${libzlibng_sources}) + +if (ENABLE_ZLIB_NG) + generate_cmakein("${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng/zconf.h.in" "${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein") + + configure_file( ${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY) +endif ()