Fix linking error on VC 2013: Update lib names for openexr
authorDaniel Genrich <daniel.genrich@gmx.net>
Wed, 13 Aug 2014 07:14:05 +0000 (09:14 +0200)
committerDaniel Genrich <daniel.genrich@gmx.net>
Wed, 13 Aug 2014 07:14:05 +0000 (09:14 +0200)
CMakeLists.txt

index 98115e08d6091cda71ecb6553bf6ae8dc5418c8b..1c063e241746e26ee8b2a40c6801cbdca2e4b77c 100644 (file)
@@ -1198,13 +1198,23 @@ elseif(WIN32)
                        set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
                        set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib)
-                       set(OPENEXR_LIBRARIES
-                               ${OPENEXR_LIBPATH}/Iex.lib
-                               ${OPENEXR_LIBPATH}/Half.lib
-                               ${OPENEXR_LIBPATH}/IlmImf.lib
-                               ${OPENEXR_LIBPATH}/Imath.lib
-                               ${OPENEXR_LIBPATH}/IlmThread.lib
-                       )
+                       if(MSVC12)
+                               set(OPENEXR_LIBRARIES
+                                       ${OPENEXR_LIBPATH}/Iex-2_1.lib
+                                       ${OPENEXR_LIBPATH}/Half.lib
+                                       ${OPENEXR_LIBPATH}/IlmImf-2_1.lib
+                                       ${OPENEXR_LIBPATH}/Imath-2_1.lib
+                                       ${OPENEXR_LIBPATH}/IlmThread-2_1.lib
+                               )
+                       else()
+                               set(OPENEXR_LIBRARIES
+                                       ${OPENEXR_LIBPATH}/Iex.lib
+                                       ${OPENEXR_LIBPATH}/Half.lib
+                                       ${OPENEXR_LIBPATH}/IlmImf.lib
+                                       ${OPENEXR_LIBPATH}/Imath.lib
+                                       ${OPENEXR_LIBPATH}/IlmThread.lib
+                               )
+                       endif()
                        endif(NOT OPENEXR_FOUND)
                endif()