Export CLANG_RESOURCE_DIR from ClangConfig.cmake (original) (raw)

Hello,

I recently opened

to try and garner some feedback on exporting the install-tree resource dir path in ClangConfig.cmake.

To summarize, I do this because the IWYU build needs access to the builtin headers to be able to execute from our build tree. We currently jump through a few hoops to guess the path and copy the headers: https://github.com/include-what-you-use/include-what-you-use/blob/master/CMakeLists.txt#L54-L79

My CMake is weak, so I’m probably missing something. Does anybody think it’s a reasonable idea, or have suggestions for better solutions?

Thanks!