Index: clang/cmake/modules/CMakeLists.txt =================================================================== --- clang/cmake/modules/CMakeLists.txt +++ clang/cmake/modules/CMakeLists.txt @@ -19,6 +19,13 @@ "${CLANG_SOURCE_DIR}/include" "${CLANG_BINARY_DIR}/include" ) +if (CLANG_RESOURCE_DIR) + set(CLANG_CONFIG_RESOURCE_DIR ${CLANG_RESOURCE_DIR}) +else() + set(CLANG_CONFIG_RESOURCE_DIR + ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) +endif() + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/ClangConfig.cmake.in ${clang_cmake_builddir}/ClangConfig.cmake Index: clang/cmake/modules/ClangConfig.cmake.in =================================================================== --- clang/cmake/modules/ClangConfig.cmake.in +++ clang/cmake/modules/ClangConfig.cmake.in @@ -8,6 +8,7 @@ set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@") set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@") set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@") +set(CLANG_RESOURCE_DIR "@CLANG_CONFIG_RESOURCE_DIR@") # Provide all our library targets to users. include("@CLANG_CONFIG_EXPORTS_FILE@")