From 4bda09fc8223c8cd96deab2bd79e59697aa996ca Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Sun, 17 Apr 2016 21:51:26 -0700 Subject: [PATCH] cmake: Install liblz4.pc This performs the same substitutions as lib/Makefile. --- cmake_unofficial/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) 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() -- 2.7.4