From 2c6c19d656a0f2f01debfc9f95a9e8edfa0ca5c5 Mon Sep 17 00:00:00 2001 From: Chris Russ Date: Wed, 22 Jun 2016 17:38:10 +1000 Subject: [PATCH] allowing to enable building of zlib manually --- CMakeLists.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e9406689..d04abe3bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # Open Asset Import Library (assimp) # ---------------------------------------------------------------------- -# +# # Copyright (c) 2006-2016, assimp team # All rights reserved. # @@ -175,7 +175,15 @@ ENDIF( CMAKE_COMPILER_IS_GNUCXX ) # Search for external dependencies, and build them from source if not found # Search for zlib -find_package(ZLIB) +OPTION(ASSIMP_BUILD_ZLIB + "Build your own zlib" + OFF +) + +IF ( NOT ASSIMP_BUILD_ZLIB ) + find_package(ZLIB) +ENDIF(ASSIMP_BUILD_ZLIB) + IF( NOT ZLIB_FOUND ) message(STATUS "compiling zlib from souces") include(CheckIncludeFile) @@ -278,7 +286,7 @@ IF ( ASSIMP_BUILD_ASSIMP_TOOLS ) ADD_SUBDIRECTORY( tools/assimp_view/ ) ENDIF ( ASSIMP_BUILD_ASSIMP_VIEW ) ENDIF ( WIN32 ) - + ADD_SUBDIRECTORY( tools/assimp_cmd/ ) ENDIF ( ASSIMP_BUILD_ASSIMP_TOOLS )