Index: scalapack/CMakeLists.txt
===================================================================
--- scalapack.orig/CMakeLists.txt	2025-01-11 18:10:23.364811071 +0100
+++ scalapack/CMakeLists.txt	2025-01-11 18:10:23.356811024 +0100
@@ -77,10 +77,11 @@
    endif ()
 endif ()
 
+include(GNUInstallDirs)
 macro(SCALAPACK_install_library lib)
   install(TARGETS ${lib} EXPORT scalapack-targets
-    ARCHIVE DESTINATION lib${LIB_SUFFIX}
-    LIBRARY DESTINATION lib${LIB_SUFFIX}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX}
     RUNTIME DESTINATION Testing
   )
 endmacro()
@@ -121,7 +122,7 @@
 CheckBLACSCompilerFlags()
 
 set(prefix ${CMAKE_INSTALL_PREFIX})
-set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
+set(libdir ${CMAKE_INSTALL_LIBDIR}${LIB_SUFFIX})
 set(PKG_CONFIG_DIR ${libdir}/pkgconfig)
 
 # --------------------------------------------------
@@ -327,8 +328,8 @@
 install(FILES
   ${SCALAPACK_BINARY_DIR}/CMakeFiles/scalapack-config.cmake
   ${SCALAPACK_BINARY_DIR}/scalapack-config-version.cmake
-  DESTINATION lib/cmake/scalapack-${SCALAPACK_VERSION}
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/scalapack-${SCALAPACK_VERSION}
   )
 
 install(EXPORT scalapack-targets
-  DESTINATION lib/cmake/scalapack-${SCALAPACK_VERSION})
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/scalapack-${SCALAPACK_VERSION})
