Cycles: fix openimageio build issues on mac/linux.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 18 Sep 2011 15:00:39 +0000 (15:00 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 18 Sep 2011 15:00:39 +0000 (15:00 +0000)
CMakeLists.txt

index b08ee065e1a31abc795e9deb5aff8a81045e1c34..3620b7dc2d1f2ffae8559e85d17083666ac2cf23 100644 (file)
@@ -525,10 +525,11 @@ if(UNIX AND NOT APPLE)
 
                # temp, update
                if(CYCLES_OIIO)
-                       set(OPENIMAGEIO_ROOT_DIR ${CYCLES_OIIO})
+                       set(OPENIMAGEIO ${CYCLES_OIIO})
                        unset(CYCLES_OIIO CACHE)
                endif()
 
+               set(OPENIMAGEIO_ROOT_DIR ${OPENIMAGEIO})
                find_package(OpenImageIO)
 
                set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARY} ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES} ${BOOST_LIBRARIES})
@@ -849,10 +850,10 @@ elseif(WIN32)
                endif()
                        
                if(WITH_OPENIMAGEIO)
-                       set(OPENIMAGEIO_ROOT_DIR ${LIBDIR}/openimageio)
-                       set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_ROOT_DIR}/include)
+                       set(OPENIMAGEIO ${LIBDIR}/openimageio)
+                       set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
                        set(OPENIMAGEIO_LIBRARIES OpenImageIO)
-                       set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO_ROOT_DIR}/lib)
+                       set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
                        set(OPENIMAGEIO_DEFINITIONS)
                endif()
 
@@ -984,10 +985,10 @@ elseif(WIN32)
                endif()
                        
                if(WITH_OPENIMAGEIO)
-                       set(OPENIMAGEIO_ROOT_DIR ${LIBDIR}/openimageio)
-                       set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_ROOT_DIR}/include)
+                       set(OPENIMAGEIO ${LIBDIR}/openimageio)
+                       set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
                        set(OPENIMAGEIO_LIBRARIES OpenImageIO)
-                       set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO_ROOT_DIR}/lib)
+                       set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
                        set(OPENIMAGEIO_DEFINITIONS)
                endif()
 
@@ -1211,9 +1212,9 @@ elseif(APPLE)
 
        if(WITH_OPENIMAGEIO)
                set(OPENIMAGEIO ${LIBDIR}/openimageio)
-               set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_ROOT_DIR}/include)
+               set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
                set(OPENIMAGEIO_LIBRARIES OpenImageIO ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARY} ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES})
-               set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO_ROOT_DIR}/lib ${JPEG_LIBPATH} ${PNG_LIBPATH} ${TIFF_LIBPATH} ${OPENEXR_LIBPATH} ${ZLIB_LIBPATH})
+               set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib ${JPEG_LIBPATH} ${PNG_LIBPATH} ${TIFF_LIBPATH} ${OPENEXR_LIBPATH} ${ZLIB_LIBPATH})
                set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
        endif()