llvm-project/libc/shared/CMakeLists.txt
Joseph Huber 75333a0981
[libc] Install the RPC headers so they can be used without LLVM source (#189996)
Summary:
The RPC headers are completely freestanding and can be installed and
used. This just places them in the standard compiler install directory
along with everything else. We put it under `shared/` so the usage
matches with using the upstream version. People using the installed
version will need to manuall `-isystem` into the include directory, but
this is part for the course for these LLVM extra headers.
2026-04-01 14:15:59 -05:00

15 lines
489 B
CMake

set(LLVM_LIBC_SHARED_RPC_EXPORT_HEADERS
"${CMAKE_CURRENT_SOURCE_DIR}/rpc.h"
"${CMAKE_CURRENT_SOURCE_DIR}/rpc_util.h"
"${CMAKE_CURRENT_SOURCE_DIR}/rpc_dispatch.h"
)
# Install the freestanding RPC interface to the compiler tree.
if(LIBC_TARGET_OS_IS_GPU)
foreach(header_path IN LISTS LLVM_LIBC_SHARED_RPC_EXPORT_HEADERS)
install(FILES "${header_path}"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/shared"
COMPONENT libc-headers)
endforeach()
endif()