[libcxx][libcxxabi][libunwind][cmake] Use `GNUInstallDirs` to support custom installation dirs
I am breaking apart D99484 so the cause of build failures is easier to
understand.
Differential Revision: https://reviews.llvm.org/D117417
GitOrigin-RevId: f16a4a034a279f52c33f41cafb7d9751ee8a01dd
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b738043..6b3bcef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,8 @@
cmake_minimum_required(VERSION 3.13.4)
+include(GNUInstallDirs)
+
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
# Add path for custom modules
@@ -210,7 +212,7 @@
${CMAKE_MODULE_PATH}
)
-set(LIBCXXABI_INSTALL_RUNTIME_DIR bin CACHE PATH
+set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libc++abi runtime libraries should be installed.")
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)