Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 3978820

Browse files
olesalscheidergottesmm
authored andcommitted
Install cmake files to lib/cmake/llvm
This is the right location for platform-specific files. On some distributions (e. g. Exherbo), a package can be installed for several architectures in parallel, but the architecture-independent files are shared. Therefore, we must not install architecture-dependent files (like the CMake config and export files) to share/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259821 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit 891198c)
1 parent d9a0847 commit 3978820

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmake/modules/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(LLVM_INSTALL_PACKAGE_DIR share/llvm/cmake)
1+
set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
22
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
33

44
get_property(LLVM_EXPORTS GLOBAL PROPERTY LLVM_EXPORTS)

docs/CMake.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -537,16 +537,16 @@ The ``find_package(...)`` directive when used in CONFIG mode (as in the above
537537
example) will look for the ``LLVMConfig.cmake`` file in various locations (see
538538
cmake manual for details). It creates a ``LLVM_DIR`` cache entry to save the
539539
directory where ``LLVMConfig.cmake`` is found or allows the user to specify the
540-
directory (e.g. by passing ``-DLLVM_DIR=/usr/share/llvm/cmake`` to
540+
directory (e.g. by passing ``-DLLVM_DIR=/usr/lib/cmake/llvm`` to
541541
the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
542542

543543
This file is available in two different locations.
544544

545-
* ``<INSTALL_PREFIX>/share/llvm/cmake/LLVMConfig.cmake`` where
545+
* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
546546
``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
547-
On Linux typically this is ``/usr/share/llvm/cmake/LLVMConfig.cmake``.
547+
On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
548548

549-
* ``<LLVM_BUILD_ROOT>/share/llvm/cmake/LLVMConfig.cmake`` where
549+
* ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
550550
``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
551551
available when building LLVM with CMake.**
552552

0 commit comments

Comments
 (0)