From 266b8bb369cbe4033677befd977a580ee2637542 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 4 Oct 2020 11:54:49 +0000
Subject: Fix installation paths


diff --git a/CMakeLists.txt b/CMakeLists.txt
index a36e574..2e349cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,9 +109,15 @@ IF (BUILD_SQUISH_EXTRA)
     ENDIF (PNG_FOUND)
 ENDIF (BUILD_SQUISH_EXTRA)
 
+INCLUDE(GNUInstallDirs)
+mark_as_advanced(CLEAR
+    CMAKE_INSTALL_LIBDIR
+    CMAKE_INSTALL_INCLUDEDIR
+    )
+
 INSTALL(
     TARGETS squish
-    LIBRARY DESTINATION lib
-    ARCHIVE DESTINATION lib
-    PUBLIC_HEADER DESTINATION include
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
     )
-- 
2.28.0

