From 120ae373eef27f98e022b0187042021439c73bdb Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Fri, 18 Oct 2024 14:23:07 +0200 Subject: [PATCH] fix: install libraries to CMAKE_INSTALL_LIBDIR (fixes gh #240) --- .docker/build-linux.sh | 2 +- cmake/libdwarfs.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.docker/build-linux.sh b/.docker/build-linux.sh index 8b074a4b5..f3a322c32 100755 --- a/.docker/build-linux.sh +++ b/.docker/build-linux.sh @@ -191,7 +191,7 @@ if [[ "$BUILD_FROM_TARBALL" == "1" ]]; then rm -rf "$INSTALLDIR" if [[ "-$BUILD_TYPE-" == *-shared-* ]]; then - LDLIBPATH="$PREFIXPATH/lib" + LDLIBPATH="$(readlink -m "$PREFIXPATH/lib/$(gcc -print-multi-os-directory)")" if [[ ":$LD_LIBRARY_PATH:" != *":$LDLIBPATH:"* ]]; then export "LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}$LDLIBPATH" fi diff --git a/cmake/libdwarfs.cmake b/cmake/libdwarfs.cmake index 90e20f77a..feb4474ad 100644 --- a/cmake/libdwarfs.cmake +++ b/cmake/libdwarfs.cmake @@ -283,12 +283,12 @@ if(NOT STATIC_BUILD_DO_NOT_USE) ${RICEPP_OBJECT_TARGETS} folly_deps EXPORT dwarfs-targets - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install( DIRECTORY include/dwarfs - DESTINATION include + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN include/dwarfs/internal EXCLUDE PATTERN include/dwarfs/tool EXCLUDE PATTERN include/dwarfs/*/internal EXCLUDE @@ -297,13 +297,13 @@ if(NOT STATIC_BUILD_DO_NOT_USE) if(DWARFS_GIT_BUILD) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/include/dwarfs/version.h - DESTINATION include/dwarfs + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dwarfs ) endif() install( FILES ${CMAKE_CURRENT_BINARY_DIR}/include/dwarfs/config.h - DESTINATION include/dwarfs + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dwarfs ) install(