Color Management: re-implement OCIO-less build configuration
[blender.git] / intern / opencolorio / CMakeLists.txt
index 131a829017b819cce37bbf413c74052e5f48079b..479bbd3ab0a2554bbf53d9d2f050b17a16f3a5a2 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
-set(INC
-       .
-       ${OPENCOLORIO_INCLUDE_DIRS}
-)
+if(WITH_OPENCOLORIO)
+       set(INC
+               .
+               ${OPENCOLORIO_INCLUDE_DIRS}
+       )
+
+       set(SRC
+               ocio_capi.cpp
+               ocio_capi.h
+       )
+
+       if(WIN32 AND NOT MINGW)
+               list(APPEND INC
+                       ${BOOST_INCLUDE_DIR}
+               )
+       endif()
+else()
+       set(INC
+               .
+               ../../source/blender/blenlib
+       )
+
+       set(SRC
+               ocio_capi_stub.cpp
+               ocio_capi.h
+       )
+endif()
 
 set(INC_SYS
        ../guardedalloc
 )
 
-set(SRC
-       ocio_capi.cpp
-       ocio_capi.h
-)
-
 add_definitions(
 )
 
-if(WIN32 AND NOT MINGW)
-       list(APPEND INC
-               ${BOOST_INCLUDE_DIR}
-       )
-endif()
-
 blender_add_lib(bf_intern_opencolorio "${SRC}" "${INC}" "${INC_SYS}")
+