From 6c26268035ed7014979d50e5d2f17cf81ea36b3d Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Tue, 19 Mar 2019 17:33:00 -0400 Subject: [PATCH] {cmake} Explicitly turn off ASM686 and AMD64 cmake options when ASSIMP_BUILD_ZLIB is on The AMD64 option causes a build failure on MSVC (#1760) and the ASM builds seem to have problems: https://github.com/madler/zlib/issues/41#issuecomment-125848075 This change also prevents these from "polluting" the cmake options if assimp is being included as a submodule. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a6e511b66..13a054de2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)