47 lines
2.4 KiB
Diff
47 lines
2.4 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 858f5d5cfd7f..16c67d7062be 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -10,6 +10,8 @@ endif()
|
|
|
|
cmake_minimum_required(VERSION 3.13.4)
|
|
|
|
+include(GNUInstallDirs)
|
|
+
|
|
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
|
|
|
# Add path for custom modules
|
|
@@ -213,9 +215,9 @@ set(CMAKE_MODULE_PATH
|
|
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
|
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
|
|
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
|
|
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
|
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
|
|
"Path where built libc++abi libraries should be installed.")
|
|
- 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(LIBCXX_LIBDIR_SUBDIR)
|
|
string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
|
|
@@ -224,16 +226,16 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
|
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
|
|
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
|
|
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
|
|
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
|
|
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
|
|
"Path where built libc++abi libraries should be installed.")
|
|
- 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.")
|
|
else()
|
|
set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
|
|
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
|
|
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
|
|
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
|
|
"Path where built libc++abi libraries should be installed.")
|
|
- 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.")
|
|
endif()
|
|
|