File: 0001-Use-GNUInstallDirs.patch

package info (click to toggle)
mini18n 0.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 308 kB
  • sloc: ansic: 729; makefile: 6
file content (49 lines) | stat: -rw-r--r-- 1,840 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: Boyuan Yang <byang@debian.org>
Date: Fri, 6 May 2022 14:40:21 -0400
Subject: Use GNUInstallDirs

---
 CMakeLists.txt     | 4 +++-
 doc/CMakeLists.txt | 4 ++--
 src/CMakeLists.txt | 8 ++++----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 606b551..7b5de31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,8 @@
 project(mini18n)
 
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.0.2)
+
+include(GNUInstallDirs)
 
 set(MINI18N_VERSION_MAJOR 0)
 set(MINI18N_VERSION_MINOR 2)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 7ccdfd7..19f12eb 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,2 +1,2 @@
-install(FILES "mini18n.3" DESTINATION "share/man/man3")
-install(FILES "mini18n_set_locale.3" DESTINATION "share/man/man3")
+install(FILES "mini18n.3" DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
+install(FILES "mini18n_set_locale.3" DESTINATION "${CMAKE_INSTALL_MANDIR}/man3")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cce12dc..ea24b76 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -25,7 +25,7 @@ set_target_properties(mini18n-shared PROPERTIES OUTPUT_NAME mini18n SOVERSION 1
 add_library(mini18n-static STATIC ${mini18n_SOURCES})
 set_target_properties(mini18n-static PROPERTIES OUTPUT_NAME mini18n)
 
-install(TARGETS mini18n-shared DESTINATION "lib")
-install(TARGETS mini18n-static DESTINATION "lib")
-install(FILES mini18n.h DESTINATION "include")
-install(FILES mini18n-multi.h DESTINATION "include")
+install(TARGETS mini18n-shared DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+install(TARGETS mini18n-static DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+install(FILES mini18n.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install(FILES mini18n-multi.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")