OSGeo / shapelib

Official repository of shapelib
Other
141 stars 66 forks source link

CMake config currently has a hard-coded `include` instead of `CMAKE_INSTALL_INCLUDEDIR` #134

Closed thbeu closed 3 months ago

thbeu commented 4 months ago
          Using absolute paths is a problem already now: The CMake config currently has a hard-coded `include` instead of `CMAKE_INSTALL_INCLUDEDIR`.

_Originally posted by @dg0yt in https://github.com/OSGeo/shapelib/pull/75#discussion_r1437764446_

rouault commented 3 months ago

@thbeu is this issue still opened?

thbeu commented 3 months ago

It's still here, but seems configurable.

https://github.com/OSGeo/shapelib/blob/2cc2975f87f89e1dab4749b1dfacfc869a258647/CMakeLists.txt#L54-L68

Note, that @dg0yt originally raised the issue.

thbeu commented 3 months ago

Or rather here:

https://github.com/OSGeo/shapelib/blob/2cc2975f87f89e1dab4749b1dfacfc869a258647/CMakeLists.txt#L133-L137

dg0yt commented 3 months ago

Or rather here:

https://github.com/OSGeo/shapelib/blob/2cc2975f87f89e1dab4749b1dfacfc869a258647/CMakeLists.txt#L133-L137

And that's the INSTALL_INTERFACE which needs to be fixed.

thbeu commented 3 months ago

Or rather here: https://github.com/OSGeo/shapelib/blob/2cc2975f87f89e1dab4749b1dfacfc869a258647/CMakeLists.txt#L133-L137

And that's the INSTALL_INTERFACE which needs to be fixed.

Right. Do you know how to do?

dg0yt commented 3 months ago

It was part of the comment: replace include with ${CMAKE_INSTALL_INCLUDEDIR}.

dg0yt commented 3 months ago

(This was initially suggested for a drive-by fix when using the same variable for the pc file.)

thbeu commented 3 months ago

Right. As simple as that and available via #139.

thbeu commented 3 months ago

(This was initially suggested for a drive-by fix when using the same variable for the pc file.)

Thanks for reminding. I changed to ${includedir} which we introduced in #135.