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 50
|
From: Victor Seva <vseva@debian.org>
Date: Sun, 16 Feb 2025 19:39:34 +0100
Subject: provide pkgconf file
---
CMakeLists.txt | 13 +++++++++++++
libbcmatroska2.pc.in | 10 ++++++++++
2 files changed, 23 insertions(+)
create mode 100644 libbcmatroska2.pc.in
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7e820e..923324f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,6 +89,19 @@ install(FILES
DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
)
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+set(exec_prefix "\${prefix}")
+set(includedir "\${prefix}/include")
+set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
+configure_file(libbcmatroska2.pc.in
+ "${CMAKE_CURRENT_BINARY_DIR}/libbcmatroska2.pc"
+ @ONLY
+)
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/libbcmatroska2.pc"
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
+
install(EXPORT ${PROJECT_NAME}Targets
FILE "${PROJECT_NAME}Targets.cmake"
DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
diff --git a/libbcmatroska2.pc.in b/libbcmatroska2.pc.in
new file mode 100644
index 0000000..7773c6a
--- /dev/null
+++ b/libbcmatroska2.pc.in
@@ -0,0 +1,10 @@
+# This is a comment
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@/bcmatroska2
+
+Name: libbcmatroska2
+Description: Implementation of the Matroska container format
+Version: @PACKAGE_VERSION@
+Libs: -L@libdir@ -lbcmatroska2
+Cflags: -I@includedir@/bcmatroska2
|