From 3aea3cc3481576f4505462a1da6329d7c5750b81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 9 Jun 2019 12:58:26 +0200
Subject: Implement GNUInstallDirs


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e8be20..a548d10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,13 +49,15 @@ set_target_properties (utf8proc PROPERTIES
 )
 
 if (UTF8PROC_INSTALL)
+  include(GNUInstallDirs)
+  mark_as_advanced(CLEAR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR)
   install(TARGETS utf8proc
-    RUNTIME DESTINATION bin
-    LIBRARY DESTINATION lib
-    ARCHIVE DESTINATION lib)
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX})
 
   install(
     FILES
       "${PROJECT_SOURCE_DIR}/utf8proc.h"
-    DESTINATION include)
+    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX})
 endif()
-- 
2.21.0

