From b03cef449361bef6d65f40382227714e0e0980c3 Mon Sep 17 00:00:00 2001
From: Kurt Kanzenbach <kurt@kmk-computers.de>
Date: Fri, 21 Feb 2020 19:47:51 +0100
Subject: [PATCH] cmake: Fix library installation directory

Signed-off-by: Kurt Kanzenbach <kurt@kmk-computers.de>
---
 src/CMakeLists.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b82d667087ba..f4ea6b379ec7 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -335,11 +335,12 @@ endif()
 target_link_libraries(geodecomp ${LIBGEODECOMP_LINK_LIBRARIES})
 
 #============= 6. INSTALLER CONFIG ===================================
+include(GNUInstallDirs)
 install(
   TARGETS geodecomp
   EXPORT ${PACKAGE_NAME}-targets
-  ARCHIVE DESTINATION lib
-  LIBRARY DESTINATION lib)
+  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
 install(FILES "${CMAKE_BINARY_DIR}/${PACKAGE_NAME}/config.h" DESTINATION include/${PACKAGE_NAME})
 install(FILES libgeodecomp.h DESTINATION include)
-- 
2.24.1

