3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/gnu-install-dirs.patch
John Ericson e0d3c9d031 llvmPackages*.libcxx*: Always use the attribute name for pname
This decision was made in a902d99422 but
just for LLVM 12. Now we apply it consitently.
2021-05-12 00:14:56 +00:00

29 lines
1.1 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92c7dc5dc557..556b3e05a042 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 8.0.0)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7e21fb2d7926..30711099a19c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -220,8 +220,8 @@ add_custom_target(cxxabi DEPENDS ${LIBCXXABI_BUILD_TARGETS})
if (LIBCXXABI_INSTALL_LIBRARY)
install(TARGETS ${LIBCXXABI_INSTALL_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()