summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/cmake/modules/LLVMConfig.cmake.in7
-rw-r--r--llvm/docs/CMake.rst8
2 files changed, 11 insertions, 4 deletions
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index 1b554998f4b..5dc9a9ef582 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -52,8 +52,15 @@ set(LLVM_ON_WIN32 @LLVM_ON_WIN32@)
set(LLVM_LIBDIR_SUFFIX @LLVM_LIBDIR_SUFFIX@)
+set(LLVM_INCLUDE_DIRS "@LLVM_CONFIG_INCLUDE_DIRS@")
+set(LLVM_LIBRARY_DIRS "@LLVM_CONFIG_LIBRARY_DIRS@")
+
+# These variables are duplicated, but they must match the LLVM variables of the
+# same name. The variables ending in "S" could some day become lists, and are
+# preserved for convention and compatibility.
set(LLVM_INCLUDE_DIR "@LLVM_CONFIG_INCLUDE_DIRS@")
set(LLVM_LIBRARY_DIR "@LLVM_CONFIG_LIBRARY_DIRS@")
+
set(LLVM_DEFINITIONS "@LLVM_DEFINITIONS@")
set(LLVM_CMAKE_DIR "@LLVM_CONFIG_CMAKE_DIR@")
set(LLVM_BINARY_DIR "@LLVM_CONFIG_BINARY_DIR@")
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index cf5d6b55a40..5d57bc98596 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -579,7 +579,7 @@ and uses them to build a simple application ``simple-tool``.
# you will need to enable C++11 support
# for your compiler.
- include_directories(${LLVM_INCLUDE_DIR})
+ include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
# Now build our tools
@@ -636,8 +636,8 @@ include
This is set to ON if LLVM was built with run time type information (RTTI),
otherwise OFF.
-``LLVM_INCLUDE_DIR``
- Path to the root directory containing LLVM header files.
+``LLVM_INCLUDE_DIRS``
+ A list of include paths to directories containing LLVM header files.
``LLVM_PACKAGE_VERSION``
The LLVM version. This string can be used with CMake conditionals, e.g., ``if
@@ -681,7 +681,7 @@ Contents of ``<project dir>/CMakeLists.txt``:
find_package(LLVM REQUIRED CONFIG)
add_definitions(${LLVM_DEFINITIONS})
- include_directories(${LLVM_INCLUDE_DIR})
+ include_directories(${LLVM_INCLUDE_DIRS})
add_subdirectory(<pass name>)
OpenPOWER on IntegriCloud