summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-11-05 23:14:59 +0000
committerReid Kleckner <reid@kleckner.net>2014-11-05 23:14:59 +0000
commit732ef3c0f52159b91a8147005478b32551e516d7 (patch)
treeaefdf325d7e37115b360753349c7f38941eba1e2 /cmake
parent362e509a74d8b7bf4bca6344f8d838da2df98bf2 (diff)
downloadclang-732ef3c0f52159b91a8147005478b32551e516d7.tar.gz
Make it easier to build against a pre-built Clang package with CMake
Installing <prefix>/share/clang/cmake/ClangConfig.cmake makes CMake's builtin find_package() utility work with Clang. This also allows downstream consumers of Clang to statically link against libraries like clangAST and have that pull in dependencies like clangBasic and LLVMSupport. See the CMake docs on packages: http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/ClangConfig.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/modules/ClangConfig.cmake b/cmake/modules/ClangConfig.cmake
new file mode 100644
index 0000000000..f052bb9e8c
--- /dev/null
+++ b/cmake/modules/ClangConfig.cmake
@@ -0,0 +1,8 @@
+# This file allows users to call find_package(Clang) and pick up our targets.
+
+# Clang doesn't have any CMake configuration settings yet because it mostly
+# uses LLVM's. When it does, we should move this file to ClangConfig.cmake.in
+# and call configure_file() on it.
+
+# Provide all our library targets to users.
+include("${CMAKE_CURRENT_LIST_DIR}/ClangTargets.cmake")