From 2be851c9665caab9e858f4c06ec59e7bb4201e17 Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Fri, 21 May 2010 03:25:38 +0000 Subject: Blender TIFF support * Removed dynamic linking libTIFF code and change it to static linking (built into the blender executable). Dynamic linking made things a fair bit more complicated and wasn't working at all before on OS X - the dylib didn't exist and wasn't being copied. Since TIFF is more heavily depended upon now in Blender, it makes sense to make it less 'optional' and more in line with other libraries. I've updated both CMake and scons, and CMake on OS X/64bit works fine. It's now up to other platform/build system maintainers to enable this for their respective platforms (Campbell will check it for linux). For windows, and non-64bit osx, we need static libtiff libraries in /lib. I've added options WITH_TIFF for CMake and WITH_BF_TIFF for scons, so if blender won't build because of this, you should be able to disable these options until your build system has been updated. * Bonus feature: while doing this, I added support for loading 16bit and 32bit per channel TIFFs - they get converted to Blender's float buffers. Handy for zbrush displacement maps! --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 038b61e56a6..57a6e8998fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON) OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON) OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) +OPTION(WITH_TIFF "Enable LibTIFF Support" ON) OPTION(WITH_DDS "Enable DDS Support" ON) OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) OPTION(WITH_PYTHON "Enable Embedded Python API" ON) @@ -410,6 +411,8 @@ IF(WIN32) SET(TIFF ${LIBDIR}/tiff) SET(TIFF_INC ${TIFF}/include) + SET(TIFF_LIBRARY tiff) + SET(TIFF_LIBPATH ${TIFF}/lib) SET(WINTAB_INC ${LIBDIR}/wintab/include) @@ -586,6 +589,8 @@ IF(APPLE) SET(TIFF ${LIBDIR}/tiff) SET(TIFF_INC ${TIFF}/include) + SET(TIFF_LIBRARY tiff) + SET(TIFF_LIBPATH ${TIFF}/lib) SET(EXETYPE MACOSX_BUNDLE) -- cgit v1.2.3