[PATCH] D134597: [CMake] install clang resource headers into `CLANG_RESOURCE_DIR/include` if `CLANG_RESOURCE_DIR` is not empty
LJC via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 25 02:25:56 PDT 2022
paperchalice created this revision.
paperchalice added a reviewer: phosek.
paperchalice added a project: clang.
Herald added a project: All.
paperchalice requested review of this revision.
Herald added a subscriber: cfe-commits.
When `CLANG_RESOURCE_DIR` is not empty, clang will look up builtin headers in `CLANG_RESOURCE_DIR/include`, this patch makes sure resource headers are installed into the correct location.
Resolve issue #57708.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134597
Files:
clang/lib/Headers/CMakeLists.txt
Index: clang/lib/Headers/CMakeLists.txt
===================================================================
--- clang/lib/Headers/CMakeLists.txt
+++ clang/lib/Headers/CMakeLists.txt
@@ -421,6 +421,9 @@
add_header_target("utility-resource-headers" ${utility_files})
set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+if(NOT CLANG_RESOURCE_DIR STREQUAL "")
+ set(header_install_dir ${CMAKE_INSTALL_BINDIR}/${CLANG_RESOURCE_DIR}/include)
+endif()
#############################################################
# Install rules for the catch-all clang-resource-headers target
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134597.462705.patch
Type: text/x-patch
Size: 609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220925/abfab4d5/attachment.bin>
More information about the cfe-commits
mailing list