[clang-tools-extra] [clang-doc] update install path to share/clang-doc instead of share/clang (PR #96555)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 13:52:29 PDT 2024
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/96555
Updates the install path for clang-doc to share/clang-doc instead share/clang to avoid confusion
>From 4f7de63a353d09c660afc6534f98bdeaaa7cf73d Mon Sep 17 00:00:00 2001
From: PeterChou1 <peter.chou at mail.utoronto.ca>
Date: Mon, 24 Jun 2024 16:50:57 -0400
Subject: [PATCH] [clang-doc] update install path to share/clang-doc instead of
share/clang
---
clang-tools-extra/clang-doc/tool/CMakeLists.txt | 4 ++--
clang-tools-extra/clang-doc/tool/ClangDocMain.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/clang-tools-extra/clang-doc/tool/CMakeLists.txt b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
index 4944251245c6b..e93a5728d6b6b 100644
--- a/clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -25,7 +25,7 @@ set(assets
)
set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
-set(resource_dir "${CMAKE_BINARY_DIR}/share/clang")
+set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
set(out_files)
function(copy_files_to_dst src_dir dst_dir file)
@@ -42,7 +42,7 @@ endfunction(copy_files_to_dst)
foreach(f ${assets})
install(FILES ${asset_dir}/${f}
- DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/clang-doc"
COMPONENT clang-doc)
copy_files_to_dst(${asset_dir} ${resource_dir} ${f})
endforeach(f)
diff --git a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
index 5517522d7967d..1feb6d3b74d70 100644
--- a/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
+++ b/clang-tools-extra/clang-doc/tool/ClangDocMain.cpp
@@ -188,7 +188,7 @@ Example usage for a project using a compile commands database:
llvm::sys::path::native(ClangDocPath, NativeClangDocPath);
llvm::SmallString<128> AssetsPath;
AssetsPath = llvm::sys::path::parent_path(NativeClangDocPath);
- llvm::sys::path::append(AssetsPath, "..", "share", "clang");
+ llvm::sys::path::append(AssetsPath, "..", "share", "clang-doc");
llvm::SmallString<128> DefaultStylesheet;
llvm::sys::path::native(AssetsPath, DefaultStylesheet);
llvm::sys::path::append(DefaultStylesheet,
More information about the cfe-commits
mailing list