aboutsummaryrefslogtreecommitdiff
path: root/lldb
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-04 13:02:18 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-12-22 00:28:53 +0000
commit95311468997160401c027e3bad3b14a391c1ead6 (patch)
tree78d22f74e1e12acfe48a4ee5930904c4c97e3ab9 /lldb
parenta282ea4898efe2b2e57a93b44e90c9e497520cfb (diff)
downloadllvm-95311468997160401c027e3bad3b14a391c1ead6.zip
llvm-95311468997160401c027e3bad3b14a391c1ead6.tar.gz
llvm-95311468997160401c027e3bad3b14a391c1ead6.tar.bz2
[lldb] Use `GNUInstallDirs` to support custom installation dirs.
Extracted from D99484. My new plan is to start from the outside and work inward. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D115570
Diffstat (limited to 'lldb')
-rw-r--r--lldb/CMakeLists.txt2
-rw-r--r--lldb/cmake/modules/AddLLDB.cmake4
-rw-r--r--lldb/cmake/modules/LLDBConfig.cmake4
3 files changed, 7 insertions, 3 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index 5c2dac3..79d4519 100644
--- a/lldb/CMakeLists.txt
+++ b/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}
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 8be214a..3291a7c 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
+++ b/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 @@ function(add_lldb_library name)
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})
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index 01c501a..e12e548 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -231,7 +231,7 @@ include_directories(BEFORE
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
@@ -239,7 +239,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
COMPONENT lldb-headers
- DESTINATION include
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
FILES_MATCHING
PATTERN "*.h"
PATTERN ".cmake" EXCLUDE