CMake: Use explicit dependencies for Xcode (as well as MSVC), to make
the CMake-generated Xcode project build properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72883 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index c531298..a21ed20 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -26,11 +26,11 @@
if( LLVM_LINK_COMPONENTS )
llvm_config(${name} ${LLVM_LINK_COMPONENTS})
endif( LLVM_LINK_COMPONENTS )
- if( MSVC )
+ if( USE_EXPLICIT_DEPENDENCIES )
target_link_libraries(${name} ${llvm_libs})
- else( MSVC )
+ else( )
add_dependencies(${name} llvm-config.target)
- endif( MSVC )
+ endif( )
get_system_libs(llvm_system_libs)
if( llvm_system_libs )
target_link_libraries(${name} ${llvm_system_libs})