File: 0001-Compile-shared-lib-and-install-it.patch

package info (click to toggle)
cctz 2.3%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 648 kB
  • sloc: cpp: 7,661; makefile: 62; ansic: 17; sh: 16
file content (36 lines) | stat: -rw-r--r-- 1,120 bytes parent folder | download
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
From: Anton Gladky <gladk@debian.org>
Date: Wed, 15 Nov 2017 19:04:21 +0100
Subject: [PATCH 1/2] Compile shared lib and install it

---
 CMakeLists.txt | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Index: cctz-2.3/CMakeLists.txt
===================================================================
--- cctz-2.3.orig/CMakeLists.txt
+++ cctz-2.3/CMakeLists.txt
@@ -68,7 +68,7 @@ set(CCTZ_HDRS
   include/cctz/zone_info_source.h
   include/cctz/civil_time.h
   )
-add_library(cctz
+add_library(cctz SHARED
   src/civil_time_detail.cc
   src/time_zone_fixed.cc
   src/time_zone_fixed.h
@@ -98,6 +98,14 @@ set_target_properties(cctz PROPERTIES
   )
 target_link_libraries(cctz PUBLIC $<$<PLATFORM_ID:Darwin>:${CoreFoundation}>)  
 add_library(cctz::cctz ALIAS cctz)
+set_target_properties(cctz PROPERTIES
+    OUTPUT_NAME "cctz"
+    VERSION ${VERSION}
+    SOVERSION ${SOVERSION}
+)
+INCLUDE(GNUInstallDirs)
+INSTALL(TARGETS cctz DESTINATION ${CMAKE_INSTALL_LIBDIR})
+INSTALL(DIRECTORY include/cctz DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
 
 if (BUILD_TOOLS)
   add_executable(time_tool src/time_tool.cc)