summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/LLVMConfig.cmake.in
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-02-09 16:35:51 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-02-09 16:35:51 +0000
commit43d6384c3810e89823b11c7c751eb2856e780914 (patch)
tree95782f8a79211b34a356707283eefc4e2257c13e /llvm/cmake/modules/LLVMConfig.cmake.in
parent81b580b455426dd885fe4858e5bd3e2f22c00f5f (diff)
downloadbcm5719-llvm-43d6384c3810e89823b11c7c751eb2856e780914.tar.gz
bcm5719-llvm-43d6384c3810e89823b11c7c751eb2856e780914.zip
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
Diffstat (limited to 'llvm/cmake/modules/LLVMConfig.cmake.in')
-rw-r--r--llvm/cmake/modules/LLVMConfig.cmake.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index 224a26352d3..4687838a1e8 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -1,5 +1,7 @@
# This file provides information and services to the final user.
+@LLVM_CONFIG_CODE@
+
set(LLVM_VERSION_MAJOR @LLVM_VERSION_MAJOR@)
set(LLVM_VERSION_MINOR @LLVM_VERSION_MINOR@)
set(LLVM_PACKAGE_VERSION @PACKAGE_VERSION@)
@@ -36,11 +38,9 @@ set(HAVE_LIBZ @HAVE_LIBZ@)
set(LLVM_ON_UNIX @LLVM_ON_UNIX@)
set(LLVM_ON_WIN32 @LLVM_ON_WIN32@)
-set(LLVM_INSTALL_PREFIX "@LLVM_INSTALL_PREFIX@")
-set(LLVM_INCLUDE_DIRS ${LLVM_INSTALL_PREFIX}/include)
-set(LLVM_LIBRARY_DIRS ${LLVM_INSTALL_PREFIX}/lib)
+set(LLVM_INCLUDE_DIRS "@LLVM_CONFIG_INCLUDE_DIRS@")
+set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBRARY_DIRS@")
set(LLVM_DEFINITIONS "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS")
+set(LLVM_CMAKE_DIR "@LLVM_CONFIG_CMAKE_DIR@")
-get_filename_component(_SELF_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
-include(${_SELF_DIR}/LLVM-Config.cmake)
-unset(_SELF_DIR)
+include(${LLVM_CMAKE_DIR}/LLVM-Config.cmake)
OpenPOWER on IntegriCloud