From 647eab6ae97908667679f7c5aff147c88b8aa82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Terziman?= Date: Fri, 25 Oct 2013 16:34:40 +0200 Subject: [PATCH] Improving CMake to build the static version of assimp with the static version of zlib --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc13a85ac..ead57ae5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,7 +110,11 @@ if( NOT ZLIB_FOUND ) # compile from sources add_subdirectory(contrib/zlib) set(ZLIB_FOUND 1) - set(ZLIB_LIBRARIES zlib) + if( ASSIMP_BUILD_STATIC_LIB ) + set(ZLIB_LIBRARIES zlibstatic) + else( ASSIMP_BUILD_STATIC_LIB ) + set(ZLIB_LIBRARIES zlib) + endif( ASSIMP_BUILD_STATIC_LIB ) set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib) else(NOT ZLIB_FOUND) ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB)