Prepare for monorepo layout

This commit is contained in:
Jonas Hahnfeld 2023-01-13 16:36:29 +01:00 committed by jenkins
parent da247bd77a
commit 51e15ea523

View File

@ -180,8 +180,13 @@ else() # Building as part of LLVM
include(${LLVMCONFIG_FILE})
endif()
if (NOT CLANG_INCLUDE_DIRS)
set (CLANG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/tools/clang/include"
"${CMAKE_BINARY_DIR}/tools/clang/include")
set (CLANG_INCLUDE_DIRS "${LLVM_MAIN_SRC_DIR}/tools/clang/include")
if (NOT EXISTS ${CLANG_INCLUDE_DIRS})
# Otherwise assume the monorepo layout.
set (CLANG_INCLUDE_DIRS ${LLVM_MAIN_SRC_DIR}/../clang/include )
endif()
set (CLANG_INCLUDE_DIRS "${CLANG_INCLUDE_DIRS}"
"${LLVM_BINARY_DIR}/tools/clang/include")
endif()
endif()