From de153e2bc2f9c53707e68a1b6020f510a5fde08d Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Thu, 13 Sep 2012 16:41:31 +0200 Subject: [PATCH] Workaround for a visual studio 2010 bug: http://public.kitware.com/Bug/view.php?id=11240. --- BaseLib/zlib/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BaseLib/zlib/CMakeLists.txt b/BaseLib/zlib/CMakeLists.txt index b278418c0ef..b925ed375a7 100644 --- a/BaseLib/zlib/CMakeLists.txt +++ b/BaseLib/zlib/CMakeLists.txt @@ -105,6 +105,10 @@ string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" add_library(zlib STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +# Workaround for a Visual Studio bug: +if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) + set_target_properties(zlib PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64") +endif() #============================================================================ # Example binaries -- GitLab