Improving CMake to build the static version of assimp with the static version of zlib

pull/261/head
Léo Terziman 2013-10-25 16:34:40 +02:00
parent e4867646ab
commit 647eab6ae9
1 changed files with 5 additions and 1 deletions

View File

@ -110,7 +110,11 @@ if( NOT ZLIB_FOUND )
# compile from sources # compile from sources
add_subdirectory(contrib/zlib) add_subdirectory(contrib/zlib)
set(ZLIB_FOUND 1) 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) set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib)
else(NOT ZLIB_FOUND) else(NOT ZLIB_FOUND)
ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB) ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB)