[llvm-dev] RFC: Move cmake shared files

Paweł Bylica via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 17 03:13:04 PDT 2016


The cmake files generated when building LLVM (including LLVMConfig.cmake)
are to support cmake's find_package() [1] function.

In the build dir the generated files are placed in
<build-dir>/share/llvm/cmake. After install, in
<prefix>/lib/llvm/share/llvm/cmake.

CMake is not able to find them without a hint. CMake searches these paths
on Unix:
- <prefix>/lib/llvm/cmake
- <prefix>/share/llvm/cmake

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.

I propose to move the generated files to <build-dir>/cmake and install them
to <prefix>/lib/llvm/cmake.

This should also help on Windows, where CMake searches in
<prefix>/llvm/cmake.

- Paweł

[1] https://cmake.org/cmake/help/v3.0/command/find_package.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160817/704afc39/attachment.html>


More information about the llvm-dev mailing list