[CMake] Make the CMake files (LLVMConfig.cmake and LLVMExports.cmake)
authorDan Liew <dan@su-root.co.uk>
Tue, 30 Jun 2015 17:16:39 +0000 (17:16 +0000)
committerDan Liew <dan@su-root.co.uk>
Tue, 30 Jun 2015 17:16:39 +0000 (17:16 +0000)
commit171129e7eb531593fe6e44bd8fef2061335cec03
tree2c171012a5a9b96deddf173fb5101718ef58931b
parent1991c597a4f73bedb2d9e90d677e6a91dcb308dc
[CMake] Make the CMake files (LLVMConfig.cmake and LLVMExports.cmake)
generated by the Autoconf/Makefile build system relocatable.

Previously the generated CMake files contained hardcoded paths which
prevented a binary installation from being relocated to a different
place in the file system. This problem was most noticeable in LLVM's
official binary releases which were completely unusable by a downstream
project trying to import the CMake targets.

Package maintainers who choose to modify the install location of the
CMake directory without using the ``PROJ_cmake`` Makefile variable
override will need to patch the generated``LLVMConfig.cmake`` so that
``LLVM_INSTALL_PREFIX`` and ``_LLVM_CMAKE_DIR`` variables are set
correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241080 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/Makefile