[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
Fri Dec 10 19:15:27 PST 2021
Ericson2314 created this revision.
Herald added a subscriber: mgorny.
Ericson2314 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Extracted from D99484 <https://reviews.llvm.org/D99484>. My new plan is to start from the outside and work
inward.
Repository:
rG LLVM Github Monorepo
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,4 @@
+include(GNUInstallDirs)
function(lldb_tablegen)
# Syntax:
# lldb_tablegen output-file [tablegen-arg ...] SOURCE source-file
@@ -113,7 +114,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
@@ -11,6 +11,11 @@
# using LLVM as an external library.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lldb)
+endif()
+
+include(GNUInstallDirs)
+
+if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
include(LLDBStandalone)
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115570.393653.patch
Type: text/x-patch
Size: 1859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211211/e1572cac/attachment-0001.bin>
More information about the lldb-commits
mailing list