Color Management: correction to previous commit
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 26 Aug 2012 13:18:43 +0000 (13:18 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 26 Aug 2012 13:18:43 +0000 (13:18 +0000)
build_files/cmake/Modules/FindOpenColorIO.cmake

index 0443d7e..79bc012 100644 (file)
@@ -62,14 +62,16 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
     PATH_SUFFIXES
       lib64 lib
     )
-  LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
+  if(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
+    LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
+  endif()
 ENDFOREACH()
 
 # handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if 
 # all listed variables are TRUE
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenColorIO DEFAULT_MSG
-    OPENCOLORIO_LIBRARY OPENCOLORIO_INCLUDE_DIR)
+    _opencolorio_LIBRARIES OPENCOLORIO_INCLUDE_DIR)
 
 IF(OPENCOLORIO_FOUND)
   SET(OPENCOLORIO_LIBRARIES ${_opencolorio_LIBRARIES})