Provide LLVMConfig in both build and install tree
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 9 Feb 2014 16:35:51 +0000 (16:35 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 9 Feb 2014 16:35:51 +0000 (16:35 +0000)
commit43d6384c3810e89823b11c7c751eb2856e780914
tree95782f8a79211b34a356707283eefc4e2257c13e
parent81b580b455426dd885fe4858e5bd3e2f22c00f5f
Provide LLVMConfig in both build and install tree

Create separate package configuration files "LLVMConfig.cmake" for the
LLVM build and install trees so that each can have information specific
to its tree.  Configure each with the corresponding include, lib, and
cmake directories.  Include the "LLVM-Config" API modules directly from
the configured cmake modules directory.

In the install tree, compute the installation prefix relative to the
file location.  In the build tree, provide information specific to the
build tree for use by tools like Clang that can build externally against
the LLVM build tree.  Prefix such values in "LLVM_BUILD_" and comment
them as such.

Contributed by Brad King.

llvm-svn: 201048
llvm/cmake/modules/CMakeLists.txt
llvm/cmake/modules/LLVMConfig.cmake.in