blob: a5a7eae5032825288b460926452e3ac87019f797 [file] [log] [blame]
Reid Klecknered8bca42014-11-05 23:14:59 +00001# This file allows users to call find_package(Clang) and pick up our targets.
2
Michael Gottesman497e97f2016-06-29 21:59:19 +00003@CLANG_CONFIG_CODE@
4
Michal Gornyf103c0d2017-01-31 14:15:40 +00005find_package(LLVM REQUIRED CONFIG
6 HINTS "@CLANG_CONFIG_LLVM_CMAKE_DIR@")
7
Michael Gottesman5ba52702016-06-29 21:59:23 +00008set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@")
Michael Gottesman497e97f2016-06-29 21:59:19 +00009set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@")
Chris Bienemanc5742972017-02-06 18:17:23 +000010set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@")
Michael Gottesman497e97f2016-06-29 21:59:19 +000011
Reid Klecknered8bca42014-11-05 23:14:59 +000012# Provide all our library targets to users.
Michael Gottesman497e97f2016-06-29 21:59:19 +000013include("@CLANG_CONFIG_EXPORTS_FILE@")
Chris Bieneman6b5851b2017-07-28 15:33:47 +000014
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.
18if(NOT TARGET clang-tablegen-targets)
19 add_custom_target(clang-tablegen-targets)
20endif()