From 7d50bef5e4fad739665c618ca3bcc615bff59a0f Mon Sep 17 00:00:00 2001 From: Rashad Kanavath <rashad.kanavath@c-s.fr> Date: Thu, 2 Feb 2017 11:17:34 +0100 Subject: [PATCH] SuperBuild: ZLIB: build without debug postfix --- SuperBuild/CMake/External_zlib.cmake | 2 ++ .../patches/ZLIB/zlib-1-debug_fixes-win.diff | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 SuperBuild/patches/ZLIB/zlib-1-debug_fixes-win.diff diff --git a/SuperBuild/CMake/External_zlib.cmake b/SuperBuild/CMake/External_zlib.cmake index c86bd4a250..dc15d5770f 100644 --- a/SuperBuild/CMake/External_zlib.cmake +++ b/SuperBuild/CMake/External_zlib.cmake @@ -27,6 +27,8 @@ if(MSVC) DEPENDEES install) endif() +SUPERBUILD_PATCH_SOURCE(ZLIB) + set(_SB_ZLIB_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include) if(WIN32) set(_SB_ZLIB_LIBRARY ${SB_INSTALL_PREFIX}/lib/zdll.lib) diff --git a/SuperBuild/patches/ZLIB/zlib-1-debug_fixes-win.diff b/SuperBuild/patches/ZLIB/zlib-1-debug_fixes-win.diff new file mode 100644 index 0000000000..78ab8499cc --- /dev/null +++ b/SuperBuild/patches/ZLIB/zlib-1-debug_fixes-win.diff @@ -0,0 +1,14 @@ +diff -burN zlib-1.2.8.orig/CMakeLists.txt zlib-1.2.8/CMakeLists.txt +--- zlib-1.2.8.orig/CMakeLists.txt Thu Feb 2 11:13:32 2017 ++++ zlib-1.2.8/CMakeLists.txt Thu Feb 2 11:14:53 2017 +@@ -60,7 +60,9 @@ + check_include_file(unistd.h Z_HAVE_UNISTD_H) + + if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") ++ ############# OTB ############# ++ # set(CMAKE_DEBUG_POSTFIX d) ++ ############# OTB ############# + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -- GitLab