aboutsummaryrefslogtreecommitdiff
path: root/libraries/libtins/libdir.patch
blob: b1252d88ad6bd07aac74833094feebc482b7e862 (plain)
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
--- CMakeLists.txt.stock	2018-04-09 18:19:55.192971704 +0200
+++ CMakeLists.txt	2018-04-09 18:20:50.347434703 +0200
@@ -224,18 +224,19 @@
     )
 ENDIF(DOXYGEN_FOUND)
 
-# The library output directory
-SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
-SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
-
 # Configuration file
 CONFIGURE_FILE(
   "${PROJECT_SOURCE_DIR}/include/tins/config.h.in"
   "${PROJECT_SOURCE_DIR}/include/tins/config.h"
 )
 
+IF(NOT CMAKE_INSTALL_LIBDIR)
+  set(CMAKE_INSTALL_LIBDIR lib)
+ENDIF()
+# The library output directory
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
+SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
 # Support for pkg-config
-SET(CMAKE_INSTALL_LIBDIR lib)
 SET(pkgconfig_prefix      ${CMAKE_INSTALL_PREFIX})
 SET(pkgconfig_exec_prefix ${CMAKE_INSTALL_PREFIX})
 SET(pkgconfig_libdir      ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})

--- src/CMakeLists.txt.stock	2018-04-09 18:21:00.281518096 +0200
+++ src/CMakeLists.txt	2018-04-09 18:21:40.244853572 +0200
@@ -219,8 +219,8 @@
 INSTALL( 
     TARGETS tins
     EXPORT libtinsTargets
-    LIBRARY DESTINATION lib
-    ARCHIVE DESTINATION lib
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
     COMPONENT dev
 )
 
@@ -233,4 +233,4 @@
     ENDFOREACH(HEADER)
 ENDMACRO()
 
-INSTALL_HEADERS_WITH_DIRECTORY(${HEADERS})
\ No newline at end of file
+INSTALL_HEADERS_WITH_DIRECTORY(${HEADERS})