Jack Andersen b66339575a [CMake] Installable find modules for terminfo and libffi
Improves cross-distro portability of LLVM cmake package by resolving paths for
terminfo and libffi via import targets.

When LLVMExports.cmake is generated for installation, it contains absolute
library paths which are likely to be a common cause of portability issues. To
mitigate this, the discovery logic for these dependencies is refactored into
find modules which get installed alongside LLVMConfig.cmake. The result is
cleaner, cmake-friendly management of these dependencies that respect the
environment of the LLVM package importer.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D114327
2021-12-05 14:46:23 -05:00

19 lines
288 B
CMake

add_llvm_component_library(LLVMInterpreter
Execution.cpp
ExternalFunctions.cpp
Interpreter.cpp
DEPENDS
intrinsics_gen
LINK_COMPONENTS
CodeGen
Core
ExecutionEngine
Support
)
if( LLVM_ENABLE_FFI )
target_link_libraries( LLVMInterpreter PRIVATE FFI::ffi )
endif()