Merge branch 'master' into blender2.8
[blender.git] / build_files / cmake / platform / platform_unix.cmake
index 32a2d6958958bf45642dde0cafb9758833c43ef2..8c11e93e81a0281804b78044ae7645c64caf0cd0 100644 (file)
@@ -353,16 +353,19 @@ if(WITH_OPENCOLORIO)
 endif()
 
 if(WITH_LLVM)
-       # Symbol conflicts with same UTF library used by OpenCollada
        if(EXISTS ${LIBDIR})
                set(LLVM_STATIC ON)
-               if(WITH_OPENCOLLADA)
-                       list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
-               endif()
        endif()
 
        find_package_wrapper(LLVM)
 
+       # Symbol conflicts with same UTF library used by OpenCollada
+       if(EXISTS ${LIBDIR})
+               if(WITH_OPENCOLLADA AND (${LLVM_VERSION} VERSION_LESS "4.0.0"))
+                       list(REMOVE_ITEM OPENCOLLADA_LIBRARIES ${OPENCOLLADA_UTF_LIBRARY})
+               endif()
+       endif()
+
        if(NOT LLVM_FOUND)
                set(WITH_LLVM OFF)
                message(STATUS "LLVM not found")