Browse Source

Patch for 64-bit zlib build with MSVC assembly

pull/308/head
Mikhail Titov 9 years ago
parent
commit
5f8223ebb5
  1. 9
      build/CMakeLists.txt
  2. 10
      build/cmake-zlib-amd64.patch

9
build/CMakeLists.txt

@ -250,14 +250,19 @@ if (NOT ZLIB_FOUND )
# We are probably on Windows # We are probably on Windows
find_program( PATCH patch C:/Program Files/Git/usr/bin C:/msys64/usr/bin C:/msys32/usr/bin C:/Strawberry/c/bin ) find_program( PATCH patch C:/Program Files/Git/usr/bin C:/msys64/usr/bin C:/msys32/usr/bin C:/Strawberry/c/bin )
include( ExternalProject ) include( ExternalProject )
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set( ZLIB_EXTRA -DAMD64=ON )
else()
set( ZLIB_EXTRA -DASM686=ON "-DCMAKE_ASM_MASM_FLAGS=/W0 /safeseh" )
endif()
ExternalProject_Add(zlib-project ExternalProject_Add(zlib-project
URL http://zlib.net/zlib-1.2.8.tar.gz URL http://zlib.net/zlib-1.2.8.tar.gz
URL_MD5 44d667c142d7cda120332623eab69f40 URL_MD5 44d667c142d7cda120332623eab69f40
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/zlib PREFIX ${CMAKE_CURRENT_BINARY_DIR}/zlib
PATCH_COMMAND "${PATCH}" -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/cmake-zlib-static.patch PATCH_COMMAND "${PATCH}" -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/cmake-zlib-static.patch
&& "${PATCH}" -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/cmake-zlib-amd64.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DWITH_STATIC=${WITH_STATIC} -DWITH_STATIC=${WITH_STATIC} ${ZLIB_EXTRA}
-DAMD64=ON -DASM686=ON "-DCMAKE_ASM_MASM_FLAGS=/W0 /safeseh"
) )
if (WITH_PCH) if (WITH_PCH)
add_dependencies( stdafx zlib-project ) add_dependencies( stdafx zlib-project )

10
build/cmake-zlib-amd64.patch

@ -0,0 +1,10 @@
--- CMakeLists.txt.orig 2015-12-07 14:19:36.447689600 -0600
+++ CMakeLists.txt 2015-12-07 14:18:23.004419900 -0600
@@ -165,6 +165,7 @@
ENABLE_LANGUAGE(ASM_MASM)
set(ZLIB_ASMS
contrib/masmx64/gvmat64.asm
+ contrib/masmx64/inffas8664.c
contrib/masmx64/inffasx64.asm
)
endif()
Loading…
Cancel
Save