File: install-libraries.diff

package info (click to toggle)
tlsh 4.11.2%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 19,992 kB
  • sloc: cpp: 9,110; python: 1,603; java: 1,214; sh: 694; javascript: 467; ansic: 54; makefile: 27; sed: 9
file content (28 lines) | stat: -rw-r--r-- 1,161 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
Description: install the library in expected directories
 We add CMake install directives in order to see the library files installed in
 the expected multiarch compatible locations.
Author: Jérémy Bobbio <lunar@debian.org>
Author: Mattia Rizzolo <mattia@debian.org>
Forwarded: https://github.com/trendmicro/tlsh/pull/110
Last-Update: 2021-10-12

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -79,11 +79,13 @@
                                                  SOVERSION "${VERSION_MAJOR}")
 endif()
 
+include(GNUInstallDirs)
+
 if(TLSH_SHARED_LIBRARY)
-    install(TARGETS tlsh_static tlsh_shared DESTINATION lib)
+    install(TARGETS tlsh_static tlsh_shared DESTINATION ${CMAKE_INSTALL_LIBDIR})
 else()
-    install(TARGETS tlsh_static             DESTINATION lib)
+    install(TARGETS tlsh_static             DESTINATION ${CMAKE_INSTALL_LIBDIR})
 endif()
 
-install(FILES ../include/tlsh.h DESTINATION include/tlsh)
-install(FILES ../include/tlsh_version.h DESTINATION include/tlsh)
+install(FILES ../include/tlsh.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tlsh)
+install(FILES ../include/tlsh_version.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tlsh)