blob: b78f0b32913eaf696be13abeea76c1d030a52a55 [file] [log] [blame]
Brad Bishope42b3e32020-01-15 22:08:42 -05001From c74f04dbab4d586287347b1d5517f36e2f0c3d8e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 Dec 2019 15:52:34 -0800
4Subject: [PATCH] Use GNUInstallDirs instead of hard-coding paths
5
6Bump minimum cmake version to be >= 3.1
7
8Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/22]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 CMakeLists.txt | 8 +++++---
12 1 file changed, 5 insertions(+), 3 deletions(-)
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index 51b354f..958e0eb 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -1,4 +1,4 @@
19-cmake_minimum_required(VERSION 2.6)
20+cmake_minimum_required(VERSION 3.1)
21 project(cannelloni)
22
23 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
24@@ -60,6 +60,8 @@ set_target_properties ( cannelloni-common
25 SOVERSION 0
26 )
27
28+include(GNUInstallDirs)
29+
30 if(SCTP_SUPPORT)
31 add_library(sctpthread STATIC sctpthread.cpp)
32 target_link_libraries(sctpthread addsources sctp)
33@@ -68,5 +70,5 @@ endif(SCTP_SUPPORT)
34 set_target_properties(addsources PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
35 target_link_libraries(cannelloni addsources cannelloni-common pthread)
36
37-install(TARGETS cannelloni DESTINATION bin)
38-install(TARGETS cannelloni-common DESTINATION lib)
39+install(TARGETS cannelloni DESTINATION ${CMAKE_INSTALL_BINDIR})
40+install(TARGETS cannelloni-common DESTINATION ${CMAKE_INSTALL_LIBDIR})
41--
422.24.1
43