OSGeo / libgeotiff

Official repository of the libgeotiff project
182 stars 70 forks source link

Provide a libgeotiff-config #21

Closed caiohamamura closed 3 months ago

caiohamamura commented 5 years ago

Each OS will install libgeotiff headers to a different locations:

/usr/include/geotiff /usr/include/libgeotiff ...

So it is hard and non-reliable to create a proper configure file to link to libgeotiff and its headers.

The reliable way would be to provide a libgeotiff-config binary to allow cross-platform compilation, just like geos and gdal.

Would it be feasible or is there a better way to link to libgeotiff that I'm missing?

dg0yt commented 2 years ago

The package already installs a CMake config file so you can do:

find_package(GeoTIFF CONFIG REQUIRED)

However, it still misses a properly prefixed target for linking, e.g. GeoTIFF::libgeotiff. Last not least, cmake usage should be added to the README.

dg0yt commented 2 years ago

The more modern alternative to a libgeotiff-config script (with non-standardized options) is pkg-config (geotiff.pc). There is https://github.com/OSGeo/libgeotiff/pull/31 for that.

kloczek commented 1 year ago

The more modern alternative to a libgeotiff-config script (with non-standardized options) is pkg-config (geotiff.pc). There is #31 for that.

At them moment widely are used onl; two interfaces: cmake module and pkgconfig API/ABI descriptions.

Only missing bit is generate and install pkgconfig file.