[libcxx-commits] [PATCH] D99484: [cmake] Use `GNUInstallDirs` to support custom installation dirs.

John Ericson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 22 10:12:32 PST 2022


Ericson2314 updated this revision to Diff 402234.
Ericson2314 added a comment.

Trim down, now that many parts have been landed already


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99484/new/

https://reviews.llvm.org/D99484

Files:
  clang-tools-extra/CMakeLists.txt
  clang-tools-extra/clang-doc/tool/CMakeLists.txt
  clang-tools-extra/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt
  clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
  clang-tools-extra/clang-tidy/CMakeLists.txt
  clang-tools-extra/clang-tidy/tool/CMakeLists.txt
  clang-tools-extra/modularize/CMakeLists.txt


Index: clang-tools-extra/modularize/CMakeLists.txt
===================================================================
--- clang-tools-extra/modularize/CMakeLists.txt
+++ clang-tools-extra/modularize/CMakeLists.txt
@@ -23,5 +23,5 @@
   )
 
 install(TARGETS modularize
-        RUNTIME DESTINATION bin
+        RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
         COMPONENT clang-extras)
Index: clang-tools-extra/clang-tidy/tool/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-tidy/tool/CMakeLists.txt
+++ clang-tools-extra/clang-tidy/tool/CMakeLists.txt
@@ -52,9 +52,9 @@
 
 
 install(PROGRAMS clang-tidy-diff.py
-  DESTINATION share/clang
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
   COMPONENT clang-tidy)
 install(PROGRAMS run-clang-tidy.py
-  DESTINATION bin
+  DESTINATION "${CMAKE_INSTALL_BINDIR}"
   COMPONENT clang-tidy
   RENAME run-clang-tidy)
Index: clang-tools-extra/clang-tidy/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-tidy/CMakeLists.txt
+++ clang-tools-extra/clang-tidy/CMakeLists.txt
@@ -113,7 +113,7 @@
 
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY .
-    DESTINATION include/clang-tidy
+    DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/clang-tidy"
     COMPONENT clang-tidy-headers
     FILES_MATCHING
     PATTERN "*.h"
Index: clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
+++ clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
@@ -21,8 +21,8 @@
   )
 
 install(PROGRAMS clang-include-fixer.el
-  DESTINATION share/clang
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
   COMPONENT clang-include-fixer)
 install(PROGRAMS clang-include-fixer.py
-  DESTINATION share/clang
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
   COMPONENT clang-include-fixer)
Index: clang-tools-extra/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt
+++ clang-tools-extra/clang-include-fixer/find-all-symbols/tool/CMakeLists.txt
@@ -20,5 +20,5 @@
   )
 
 install(PROGRAMS run-find-all-symbols.py
-  DESTINATION share/clang
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
   COMPONENT find-all-symbols)
Index: clang-tools-extra/clang-doc/tool/CMakeLists.txt
===================================================================
--- clang-tools-extra/clang-doc/tool/CMakeLists.txt
+++ clang-tools-extra/clang-doc/tool/CMakeLists.txt
@@ -19,9 +19,9 @@
   )
 
 install(FILES ../assets/clang-doc-default-stylesheet.css
-  DESTINATION share/clang
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
   COMPONENT clang-doc)
 
 install(FILES ../assets/index.js
-  DESTINATION share/clang
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
   COMPONENT clang-doc)
Index: clang-tools-extra/CMakeLists.txt
===================================================================
--- clang-tools-extra/CMakeLists.txt
+++ clang-tools-extra/CMakeLists.txt
@@ -1,4 +1,5 @@
 include(CMakeDependentOption)
+include(GNUInstallDirs)
 
 option(CLANG_TIDY_ENABLE_STATIC_ANALYZER
   "Include static analyzer checks in clang-tidy" ON)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99484.402234.patch
Type: text/x-patch
Size: 3348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220122/05279b2a/attachment-0001.bin>


More information about the libcxx-commits mailing list