Reid Kleckner | ed8bca4 | 2014-11-05 23:14:59 +0000 | [diff] [blame] | 1 | # This file allows users to call find_package(Clang) and pick up our targets. |
| 2 | |
Michael Gottesman | 497e97f | 2016-06-29 21:59:19 +0000 | [diff] [blame] | 3 | @CLANG_CONFIG_CODE@ |
| 4 | |
Michal Gorny | f103c0d | 2017-01-31 14:15:40 +0000 | [diff] [blame] | 5 | find_package(LLVM REQUIRED CONFIG |
| 6 | HINTS "@CLANG_CONFIG_LLVM_CMAKE_DIR@") |
| 7 | |
Michael Gottesman | 5ba5270 | 2016-06-29 21:59:23 +0000 | [diff] [blame] | 8 | set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@") |
Michael Gottesman | 497e97f | 2016-06-29 21:59:19 +0000 | [diff] [blame] | 9 | set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@") |
Chris Bieneman | c574297 | 2017-02-06 18:17:23 +0000 | [diff] [blame] | 10 | set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@") |
Michael Gottesman | 497e97f | 2016-06-29 21:59:19 +0000 | [diff] [blame] | 11 | |
Reid Kleckner | ed8bca4 | 2014-11-05 23:14:59 +0000 | [diff] [blame] | 12 | # Provide all our library targets to users. |
Michael Gottesman | 497e97f | 2016-06-29 21:59:19 +0000 | [diff] [blame] | 13 | include("@CLANG_CONFIG_EXPORTS_FILE@") |
Chris Bieneman | 6b5851b | 2017-07-28 15:33:47 +0000 | [diff] [blame] | 14 | |
| 15 | # By creating clang-tablegen-targets here, subprojects that depend on Clang's |
| 16 | # tablegen-generated headers can always depend on this target whether building |
| 17 | # in-tree with Clang or not. |
| 18 | if(NOT TARGET clang-tablegen-targets) |
| 19 | add_custom_target(clang-tablegen-targets) |
| 20 | endif() |