OSGeo / libgeotiff

Official repository of the libgeotiff project
178 stars 69 forks source link

configure: generate geotiff.pc file and add to installation #86

Closed caiohamamura closed 1 month ago

caiohamamura commented 1 year ago

Updates #31, also adding the geotiff.pc as an installation target.

rouault commented 1 year ago

this fails on windows. cf https://github.com/OSGeo/libgeotiff/actions/runs/5328473710/jobs/9664025659?pr=86

caiohamamura commented 1 year ago

I have fixed it, I forgot to configure the file first. I also added vcpkg.json as the classic mode is being deprecated.

rouault commented 1 year ago

@caiohamamura "I also added vcpkg.json as the classic mode is being deprecated." can you explain what do you mean exactly ? I know vcpkg just a bit, but I'm wondering why we should provide vcpkg specific here. I would assume this would be the role of https://github.com/microsoft/vcpkg/tree/master/ports/proj

caiohamamura commented 1 year ago

Actually the vcpkg.json is just a file to say which are the library dependencies of the package, so we don't even need to manually run vcpkg install tiff, because it is already listed in vcpkg.json and will automatically download and build it during the cmake configuration step.

Before the vcpkg installed the dependencies "globally", now it will download and build it in the contained build directory, but it still uses caching in case different projects use the same dependencies, so the vcpkg.json manifest is much safer as it doesn't pollute the "global" environment.

rouault commented 1 year ago

@dg0yt I would be interested by your opinion regarding the above discussion about having a vcpkg.json in the libgeotiff repo

dg0yt commented 1 year ago

Sorry, this was burried in 600 other e-mails from osgeo subscriptions.

A local vcpkg.json manifest would offer some benefits over the classic vcpkg command line installation:

However, the build and installation would normally take place during the CMake configuration step. Installing (building) the dependencies would no longer be clearly separated from configuring libgeotiff.

In any case this doesn't belong into this PR, and it must be complemented by CI changes.

caiohamamura commented 1 year ago

Sorry, this was burried in 600 other e-mails from osgeo subscriptions.

A local vcpkg.json manifest would offer some benefits over the classic vcpkg command line installation:

  • Users and CI could easily use the same set of dependencies.
  • The manifest could pin versions of key dependencies independent of the vcpkg revision, or even add overlays for some ports.

However, the build and installation would normally take place during the CMake configuration step. Installing (building) the dependencies would no longer be clearly separated from configuring libgeotiff.

In any case this doesn't belong into this PR, and it must be complemented by CI changes.

I dropped the vcpkg commit in this PR, I may add another PR updating the CI if I find the time.

rouault commented 1 month ago

superseded per https://github.com/OSGeo/libgeotiff/pull/112