1From 066c49158a71ea77598c9e1ae16bba63d6ac6bb5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 Dec 2019 23:41:35 -0800
4Subject: [PATCH] cmake: Use GNUInstallDirs instead of hardcoding lib path
5
6Upstream-Status: Submitted [https://github.com/Jacajack/liblightmodbus/pull/12]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 CMakeLists.txt | 6 +++---
10 1 file changed, 3 insertions(+), 3 deletions(-)
11
12diff --git a/CMakeLists.txt b/CMakeLists.txt
13index ce6cc88..bee83aa 100644
14--- a/CMakeLists.txt
15+++ b/CMakeLists.txt
16@@ -242,14 +242,14 @@ if ( DEFINED AVR )
17 	)
18 endif( )
19
20-
21+include(GNUInstallDirs)
22 #Installation
23 install(
24 	TARGETS lightmodbus
25-	ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/"
26+	ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/"
27 )
28
29 #Install headers
30 install(
31 	DIRECTORY "${CMAKE_SOURCE_DIR}/include/" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/" FILES_MATCHING PATTERN "*.h"
32-)
33\ No newline at end of file
34+)
35--
362.24.1
37
38