File: pkgconfig.patch

package info (click to toggle)
g2clib 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 13,380 kB
  • sloc: ansic: 26,378; python: 76; sh: 46; makefile: 26
file content (38 lines) | stat: -rw-r--r-- 978 bytes parent folder | download | duplicates (2)
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
Description: Add a pkg-config file for g2clib
Author: Alastair McKinstry <mckinstry@debian.org>
Forwarded: no
Last-Updated: 2024-11-03

Updated to include private dependency on libaec.

--- /dev/null
+++ b/pkg-config/g2c.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=${prefix}/include
+
+Name: glib2c
+Description: NCEP GRIB2 encoder/decoder library
+Requires: libpng
+Version: @VERSION@
+Libs: -lg2c
+Libs.private: -lg2c -lpng16 -lopenjp2 -laec
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,6 +134,14 @@
   endif()
 endif()
 
+# pkg-config
+configure_package_config_file(
+  ${CMAKE_CURRENT_SOURCE_DIR}/pkg-config/g2c.pc.in ${CMAKE_BINARY_DIR}/g2c.pc
+  INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+  install(FILES ${CMAKE_BINARY_DIR}/g2c.pc
+  DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+
 # Determine whether or not to generate documentation.
 if(ENABLE_DOCS)
   find_package(Doxygen REQUIRED)