<div dir="ltr">The cmake files generated when building LLVM (including LLVMConfig.cmake) are to support cmake's find_package() [1] function.<div><br></div><div>In the build dir the generated files are placed in <build-dir>/share/llvm/cmake. After install, in <prefix>/lib/llvm/share/llvm/cmake.</div><div><br></div><div>CMake is not able to find them without a hint. CMake searches these paths on Unix:</div><div>- <prefix>/lib/llvm/cmake</div><div>- <prefix>/share/llvm/cmake</div><div><br></div><div>Some distributions try to workaround the problem by moving contents of /lib/llvm/share/llvm/cmake to /share/llvm/cmake, but usually that breaks the configuration included in LLVMConfig.cmake because of some hardcoded paths there.</div><div><br></div><div>I propose to move the generated files to <build-dir>/cmake and install them to <prefix>/lib/llvm/cmake.</div><div><br></div><div>This should also help on Windows, where CMake searches in <prefix>/llvm/cmake.</div><div><br></div><div>- Paweł<br><div><br></div><div>[1] <a href="https://cmake.org/cmake/help/v3.0/command/find_package.html">https://cmake.org/cmake/help/v3.0/command/find_package.html</a></div></div></div>