+ # Add the explicit dependency information for this library.
+ #
+ # It would be nice to verify that we have the dependencies for this library
+ # name, but using get_property(... SET) doesn't suffice to determine if a
+ # property has been set to an empty value.
+ get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
+
+ llvm_map_components_to_libnames(llvm_libs
+ ${ARG_LINK_COMPONENTS}
+ ${LLVM_LINK_COMPONENTS}
+ )
+
+ if(CMAKE_VERSION VERSION_LESS 2.8.12)
+ # Link libs w/o keywords, assuming PUBLIC.
+ target_link_libraries(${name}
+ ${ARG_LINK_LIBS}
+ ${lib_deps}
+ ${llvm_libs}
+ )
+ elseif(ARG_STATIC)
+ target_link_libraries(${name} INTERFACE
+ ${ARG_LINK_LIBS}
+ ${lib_deps}
+ ${llvm_libs}
+ )