nixpkgs-23.11-llvm/llvm/6/libcxxabi/gnu-install-dirs.patch
2024-05-22 14:55:29 +08:00

29 lines
1.1 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1adbdb338322..2978631e1c58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,8 @@ set(CMAKE_MODULE_PATH
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(libcxxabi CXX C)
+ include(GNUInstallDirs)
+
set(PACKAGE_NAME libcxxabi)
set(PACKAGE_VERSION 6.0.0)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 240f6d0d103b..7ad5c31ec7b4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -181,8 +181,8 @@ add_custom_target(cxxabi DEPENDS ${LIBCXXABI_TARGETS})
if (LIBCXXABI_INSTALL_LIBRARY)
install(TARGETS ${LIBCXXABI_TARGETS}
- LIBRARY DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
- ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_PREFIX}lib${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
+ LIBRARY DESTINATION ${LIBCXXABI_INSTALL_PREFIX}${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
+ ARCHIVE DESTINATION ${LIBCXXABI_INSTALL_PREFIX}${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} COMPONENT cxxabi
)
endif()