diff options
author | Smoked Cheese <root@ubuntology.ru> | 2018-01-15 14:23:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-15 14:23:33 +0300 |
commit | 402664f58d3b076a3715ddf0fdb6bb49c70c57b4 (patch) | |
tree | ada04209d97dbf9800d48e8e29490dc3c4b2c94d /cmake | |
parent | e16d3894c5979fcfe1c57bf7dadc455ce690baf9 (diff) |
update rpm spec and use variables in cmake instead of hardcoded paths (#624)
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ModulePackage.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cmake/ModulePackage.cmake b/cmake/ModulePackage.cmake index c38e7de0..7a96abcf 100644 --- a/cmake/ModulePackage.cmake +++ b/cmake/ModulePackage.cmake | |||
@@ -89,10 +89,10 @@ function(install_module lib) | |||
89 | VERSION ${SOVERSION} | 89 | VERSION ${SOVERSION} |
90 | SOVERSION ${SOVERSION_MAJOR} | 90 | SOVERSION ${SOVERSION_MAJOR} |
91 | ) | 91 | ) |
92 | install(TARGETS ${lib}_shared DESTINATION "lib") | 92 | install(TARGETS ${lib}_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
93 | endif() | 93 | endif() |
94 | if(ENABLE_STATIC) | 94 | if(ENABLE_STATIC) |
95 | install(TARGETS ${lib}_static DESTINATION "lib") | 95 | install(TARGETS ${lib}_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
96 | endif() | 96 | endif() |
97 | 97 | ||
98 | string(REPLACE ";" " " ${lib}_PKGCONFIG_LIBS "${${lib}_PKGCONFIG_LIBS}") | 98 | string(REPLACE ";" " " ${lib}_PKGCONFIG_LIBS "${${lib}_PKGCONFIG_LIBS}") |
@@ -104,9 +104,15 @@ function(install_module lib) | |||
104 | @ONLY | 104 | @ONLY |
105 | ) | 105 | ) |
106 | 106 | ||
107 | configure_file( | ||
108 | "${toxcore_SOURCE_DIR}/other/rpm/${lib}.spec.in" | ||
109 | "${CMAKE_BINARY_DIR}/${lib}.spec" | ||
110 | @ONLY | ||
111 | ) | ||
112 | |||
107 | install(FILES | 113 | install(FILES |
108 | ${CMAKE_BINARY_DIR}/${lib}.pc | 114 | ${CMAKE_BINARY_DIR}/${lib}.pc |
109 | DESTINATION "lib/pkgconfig") | 115 | DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) |
110 | 116 | ||
111 | foreach(sublib ${${lib}_API_HEADERS}) | 117 | foreach(sublib ${${lib}_API_HEADERS}) |
112 | string(REPLACE "^" ";" sublib ${sublib}) | 118 | string(REPLACE "^" ";" sublib ${sublib}) |