<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/95747>95747</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [cmake] Expose clang resource dir to installed CMake
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kimgr
      </td>
    </tr>
</table>

<pre>
    In IWYU's build, we guess Clang's resource dir based on the `CMAKE_PREFIX_PATH`, so we can collect the builtin/resource headers for our own build tree. Unfotunately, depending on packaging/platform, the path to the resource dir varies quite a bit.

Is there any chance to expose something like `CLANG_RESOURCE_DIR` in `ClangConfig.cmake`?

It's not fully clear to me what the layering looks like there, but it feels like it should be possible.

Thanks!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxUktGPmzgQxv8a8zLayJhAlgceckm4i-72ukp31fYpMvYALsamttlt_vvKsGqVF7A09vf75pvh3qvOIFYk_4vkx4TPobeuGtTYuaSx8ladDZy_fHslbOehmZWWhB3gHaGb0Xs4aG66pebQ29kJBKkcNNyjBGsg9AikoIen_b-n6_PlVJ-_Xp_3L_-QgkYdb6OU4AaE1RpFWB5ETFCGsPq3aI9covPQWgd2dmDfzeoGgkPcwKtpbZgND6hvUVjihEYq00UTExcD71Q0Wk-ah9a6MV6KrImHHoJdznctvHGn0MOPWQUEDo0KG0KPhO7X79nHJw6BmxuInhuBUQZ_TtYjeDti6CNeq2FN4L_9_39fL6fPn14vh9P1eL6QgoIySy2GeLCmVd1GjHzAmE5W3-HCErKxAdpZ6xsIjdxF4ojw3vM1OM1v6BaqtYNf2YvL2G0zB1ABWkT9UVIBfG9nLaFBmKz3qtF41-VLz83gCUsTWWWyzEqeYJXu0scipSXNkr4q0ozSJi3bImeM77AsZI5MSFlKzMutSFTFKNvSIt3RXZ7TbIPZNhetfGzStKAN5mRLceRKb7R-GzfWdYnyfsaqzHfbXaJ5g9ov68mYWLeNxU11Vbz_0MydJ1uqlQ_-j0JQQS87vcaZH-G0DmZRuB90sKCMD1xrlHB44gMms9NVH8LkSbYnrCas7lTo52Yj7EhYHTEfv4fJ2e8oAmH14toTVq_G3yr2KwAA__8MAxop">