[Lldb-commits] [PATCH] D115570: [lldb] Use `GNUInstallDirs` to support custom installation dirs.

John Ericson via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 13 19:09:23 PST 2021


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



1. Updating D115570 <https://reviews.llvm.org/D115570>: [lldb] Use `GNUInstallDirs` to support custom installation dirs. #
2. Enter a brief description of the changes included in this update.
3. The first line is used as subject, next lines as comment. #
4. If you intended to create a new revision, use:
5. $ arc diff --create

remove blank line we don't need to add


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115570

Files:
  lldb/CMakeLists.txt
  lldb/cmake/modules/AddLLDB.cmake
  lldb/cmake/modules/LLDBConfig.cmake


Index: lldb/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/cmake/modules/LLDBConfig.cmake
+++ lldb/cmake/modules/LLDBConfig.cmake
@@ -226,7 +226,7 @@
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
   install(DIRECTORY include/
     COMPONENT lldb-headers
-    DESTINATION include
+    DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
     FILES_MATCHING
     PATTERN "*.h"
     PATTERN ".cmake" EXCLUDE
@@ -234,7 +234,7 @@
 
   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
     COMPONENT lldb-headers
-    DESTINATION include
+    DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
     FILES_MATCHING
     PATTERN "*.h"
     PATTERN ".cmake" EXCLUDE
Index: lldb/cmake/modules/AddLLDB.cmake
===================================================================
--- lldb/cmake/modules/AddLLDB.cmake
+++ lldb/cmake/modules/AddLLDB.cmake
@@ -1,3 +1,5 @@
+include(GNUInstallDirs)
+
 function(lldb_tablegen)
   # Syntax:
   # lldb_tablegen output-file [tablegen-arg ...] SOURCE source-file
@@ -113,7 +115,7 @@
     endif()
     # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
     install(TARGETS ${name} COMPONENT ${name}
-      RUNTIME DESTINATION bin
+      RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
       LIBRARY DESTINATION ${install_dest}
       ARCHIVE DESTINATION ${install_dest}
       FRAMEWORK DESTINATION ${install_dest})
Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -1,5 +1,7 @@
 cmake_minimum_required(VERSION 3.13.4)
 
+include(GNUInstallDirs)
+
 # Add path for custom modules.
 set(CMAKE_MODULE_PATH
   ${CMAKE_MODULE_PATH}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115570.394118.patch
Type: text/x-patch
Size: 1698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211214/5f3403c9/attachment-0001.bin>


More information about the lldb-commits mailing list