LLDB standalone build: check if Clang was built independently from LLVM
This is fix for bug 23704: LLDB standalone build always include
ClangConfig.cmake even if Clang was built with LLVM (ClangConfig.cmake
doesn't exist).
Patch by: Eugene Zelenko
llvm-svn: 240419
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index f563d35..26b641f 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -85,7 +85,9 @@
# Import CMake library targets from LLVM and Clang.
include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
- include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
+ if ( EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake" )
+ include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
+ endif()
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")