summaryrefslogtreecommitdiffstats
path: root/cmake_unofficial
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2016-04-18 04:51:26 (GMT)
committerKevin Cernekee <cernekee@gmail.com>2016-04-18 06:11:42 (GMT)
commit4bda09fc8223c8cd96deab2bd79e59697aa996ca (patch)
tree13a450dd92078ac9698f309ce5b8562faec6d82d /cmake_unofficial
parent8b562a4f37c33ee026bc5976c7cff9c210c5d35f (diff)
downloadlz4-4bda09fc8223c8cd96deab2bd79e59697aa996ca.zip
lz4-4bda09fc8223c8cd96deab2bd79e59697aa996ca.tar.gz
lz4-4bda09fc8223c8cd96deab2bd79e59697aa996ca.tar.bz2
cmake: Install liblz4.pc
This performs the same substitutions as lib/Makefile.
Diffstat (limited to 'cmake_unofficial')
-rw-r--r--cmake_unofficial/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake_unofficial/CMakeLists.txt b/cmake_unofficial/CMakeLists.txt
index dbfc7d6..3f113b1 100644
--- a/cmake_unofficial/CMakeLists.txt
+++ b/cmake_unofficial/CMakeLists.txt
@@ -74,6 +74,15 @@ if(BUILD_LIBS)
DESTINATION include
)
+ set(PREFIX ${CMAKE_INSTALL_PREFIX})
+ set(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
+ set(INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/include)
+ string(SUBSTRING ${CPACK_PACKAGE_VERSION_PATCH} 1 -1 VERSION)
+ configure_file(${LZ4_DIR}/liblz4.pc.in liblz4.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblz4.pc
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig"
+ )
+
if(BUILD_TOOLS)
target_link_libraries(lz4 liblz4)
endif()