mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-01 05:11:15 +00:00
6b5851bb4a
By creating this target other projects that depend on clang-generated headers (like LLDB) will no longer be order-dependent on Clang being processed by CMake first. Also, by creating a dummy of this target in ClangConfig.cmake, projects that can build against out-of-tree clang can freely depend on the target without needing to have conditionals for if clang is in-tree or out-of-tree. llvm-svn: 309390
21 lines
696 B
CMake
21 lines
696 B
CMake
# This file allows users to call find_package(Clang) and pick up our targets.
|
|
|
|
@CLANG_CONFIG_CODE@
|
|
|
|
find_package(LLVM REQUIRED CONFIG
|
|
HINTS "@CLANG_CONFIG_LLVM_CMAKE_DIR@")
|
|
|
|
set(CLANG_EXPORTED_TARGETS "@CLANG_EXPORTS@")
|
|
set(CLANG_CMAKE_DIR "@CLANG_CONFIG_CMAKE_DIR@")
|
|
set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@")
|
|
|
|
# Provide all our library targets to users.
|
|
include("@CLANG_CONFIG_EXPORTS_FILE@")
|
|
|
|
# By creating clang-tablegen-targets here, subprojects that depend on Clang's
|
|
# tablegen-generated headers can always depend on this target whether building
|
|
# in-tree with Clang or not.
|
|
if(NOT TARGET clang-tablegen-targets)
|
|
add_custom_target(clang-tablegen-targets)
|
|
endif()
|