Skip to content

Commit

Permalink
Merge pull request #2382 from asmaloney/fix_zlib_AMD64
Browse files Browse the repository at this point in the history
{cmake} Explicitly turn off ASM686 & AMD64 options when ASSIMP_BUILD_ZLIB is on
  • Loading branch information
kimkulling committed Mar 25, 2019
2 parents f875348 + 6c26268 commit a43ac5b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,15 @@ IF( NOT ZLIB_FOUND )
INCLUDE(CheckIncludeFile)
INCLUDE(CheckTypeSize)
INCLUDE(CheckFunctionExists)

# Explicitly turn off ASM686 and AMD64 cmake options.
# The AMD64 option causes a build failure on MSVC and the ASM builds seem to have problems:
# https://github.com/madler/zlib/issues/41#issuecomment-125848075
# Also prevents these options from "polluting" the cmake options if assimp is being
# included as a submodule.
set( ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE )
set( AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE )

# compile from sources
ADD_SUBDIRECTORY(contrib/zlib)
SET(ZLIB_FOUND 1)
Expand Down

0 comments on commit a43ac5b

Please sign in to comment.