OpenEXR: Enable again for MSVC 2010
authorDaniel Genrich <daniel.genrich@gmx.net>
Thu, 2 Aug 2012 14:21:25 +0000 (14:21 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Thu, 2 Aug 2012 14:21:25 +0000 (14:21 +0000)
CMakeLists.txt

index 75cefd0c2198c20ab9f02ce336763d9bcfe6cec6..a3411176b1ec968f055af18c8bd334b1f96d6b98 100644 (file)
@@ -1122,10 +1122,17 @@ elseif(WIN32)
                endif()
 
                if(WITH_IMAGE_OPENEXR)
-                       set(OPENEXR ${LIBDIR}/openexr)
-                       set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
-                       set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
-                       set(OPENEXR_LIBPATH ${OPENEXR}/lib)
+                       if(MSVC10)
+                               set(OPENEXR ${LIBDIR}/openexr)
+                               set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/vc_10)
+                               set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
+                               set(OPENEXR_LIBPATH ${OPENEXR}/lib/vc_10)
+                       else()
+                               set(OPENEXR ${LIBDIR}/openexr)
+                               set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include)
+                               set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
+                               set(OPENEXR_LIBPATH ${OPENEXR}/lib)
+                       endif()
                endif()
 
                if(WITH_IMAGE_TIFF)
@@ -1651,9 +1658,6 @@ endif()
 
 # MSVC2010 fails to links C++ libs right
 if(MSVC10)
-       if(WITH_IMAGE_OPENEXR)
-               message(WARNING "MSVC 2010 does not support OpenEXR, disabling WITH_IMAGE_OPENEXR. To enable support use Use MSVC 2008")
-       endif()
        if(WITH_OPENCOLLADA)
                message(WARNING "MSVC 2010 does not support OpenCollada, disabling WITH_OPENCOLLADA. To enable support use Use MSVC 2008")
        endif()