#3470 closed enhancement (fixed)
gdal.pc would be useful
Reported by: | Ari Jolma | Owned by: | Mateusz Łoskot |
---|---|---|---|
Priority: | normal | Milestone: | 1.11.0 |
Component: | ConfigBuild | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Many libraries report their requirements in pkg-config files (see http://pkg-config.freedesktop.org/wiki/). gdal-config is fine, but it requires shell, which is not always available. Thus a gdal.pc, which is installed into /usr/local/lib/pkgconfig, would be great.
Attachments (1)
Change History (8)
comment:1 by , 12 years ago
Owner: | changed from | to
---|
by , 12 years ago
Attachment: | gdal-pkg-config-support.patch added |
---|
comment:2 by , 12 years ago
I have never written any pkg-config file, so this is my first one and I expect it's not completely right, but it seems to work for me:
mloskot@dog: gdal$ pkg-config --modversion gdal 1.9.0 mloskot@dog: gdal$ pkg-config --libs gdal -L/home/mloskot/dev/gdal/_svn/trunk/gdal -L/usr/local/lib -lgdal -lgeos_c -lsqlite3 -lexpat -lz -lpthread -lm -lrt -ldl mloskot@dog: gdal$ pkg-config --cflags gdal -I/home/mloskot/dev/gdal/_svn/trunk/gdal/port -I/home/mloskot/dev/gdal/_svn/trunk/gdal/gcore -I/home/mloskot/dev/gdal/_svn/trunk/gdal/alg -I/home/mloskot/dev/gdal/_svn/trunk/gdal/ogr -I/home/mloskot/dev/gdal/_svn/trunk/gdal/ogr/ogrsf_frmts mloskot@dog: gdal$ pkg-config --variable=datadir gdal /home/mloskot/dev/gdal/_svn/trunk/gdal/data mloskot@dog: gdal$ pkg-config --print-variables gdal CONFIG_VERSION exec_prefix CONFIG_CFLAGS CONFIG_LIBS datadir prefix libdir includedir CONFIG_DATA CONFIG_PREFIX
comment:3 by , 11 years ago
This would realy help the use of GDAL on Unixes (Mac/Linux) where pkg-config is available !
/usr/lib/pkgconfig/GDAL.pc
name=gdal prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${exec_prefix}/include datadir=${prefix}/share/${name} Name: lib${name} Description: Geospatial Data Abstraction Library Version: 1.10.0 Libs: -L${libdir} -l${name} Cflags: -I${includedir}/${name}
comment:4 by , 11 years ago
Milestone: | → 2.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:7 by , 10 years ago
Milestone: | 2.0 → 1.11.0 |
---|
Note:
See TracTickets
for help on using tickets.
Prototype of gdal.pc implementation