blob: 202e460681d9eb0be43a893308af45a6b240867a [file] [log] [blame]
commit a5907daf1b111e4ad7aab4f558f57e2af1e37e55
Author: Peter Wu <peter@lekensteyn.nl>
Date: Mon Feb 4 13:08:10 2019 +0100
CMake: install pkg-config files for parity with autotools
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a271876..e1496a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,6 +92,19 @@ configure_file(Bcg729Config.cmake.in
@ONLY
)
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+set(exec_prefix "\${prefix}")
+set(includedir "\${prefix}/include")
+set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
+configure_file(libbcg729.pc.in
+ "${CMAKE_CURRENT_BINARY_DIR}/libbcg729.pc"
+ @ONLY
+)
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/libbcg729.pc"
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
+
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/Bcg729/cmake")
install(EXPORT Bcg729Targets
FILE Bcg729Targets.cmake