Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cmake version file #1493

Merged
merged 1 commit into from
Jan 13, 2024
Merged

Add cmake version file #1493

merged 1 commit into from
Jan 13, 2024

Conversation

domin144
Copy link
Contributor

@domin144 domin144 commented Dec 6, 2023

Add the missing cmake version file, so that software using the library can check for version compatibility.

@domin144
Copy link
Contributor Author

domin144 commented Dec 6, 2023

cmake/OpenJPEGConfigVersion.cmake.in is copied from cmake sources, covered by 3-clause BSD license.
If this creates a licensing issue, the change could be restricted to cmake > 3.0.0 only.

They have no copyright header and cmake documentation says "they can be used as starting point to create more sophisticated custom ConfigVersion.cmake files"[1], so not sure if we should bother.

[1] https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html

@rouault
Copy link
Collaborator

rouault commented Dec 8, 2023

@mayeut does that look good to you ?

@domin144
Copy link
Contributor Author

domin144 commented Dec 9, 2023

One more doubt. I used SameMajorVersion option. If hypothetical version 3 is supposed to be compatible with any previous version If the current version is API compatible with 1.x, than AnyNewerVersion should be used instead (and BasicConfigVersion-AnyNewerVersion.cmake.in in place of BasicConfigVersion-SameMajorVersion.cmake.in).
EDIT: I mixed perspective. Version file is provided with the library, so it is it's statement of what it provides.

@rouault
Copy link
Collaborator

rouault commented Dec 9, 2023

If the current version is API compatible with 1.x,

it is not

@rouault
Copy link
Collaborator

rouault commented Jan 7, 2024

I believe we should just remove support for CMake < 3.0. Newer CMake versions are actually going to remove support for CMake < 3.5 soon. That way we could remove cmake/OpenJPEGConfigVersion.cmake.in

@domin144
Copy link
Contributor Author

domin144 commented Jan 7, 2024

If dropping support for old cmake is an option, I would be really happy with that.
I think this should be a separate PR and this PR could be rebased then.

@rouault
Copy link
Collaborator

rouault commented Jan 7, 2024

If dropping support for old cmake is an option, I would be really happy with that.

would you be interested in tackling that?

I think this should be a separate PR and this PR could be rebased then.

indeed

@domin144
Copy link
Contributor Author

domin144 commented Jan 8, 2024

I will try to find some time this week to make PR removing support for cmake < 3.5.

@domin144
Copy link
Contributor Author

domin144 commented Jan 8, 2024

Rebased.

@rouault rouault added this to the 2.5.1 milestone Jan 8, 2024
@rouault rouault merged commit 0e3b3bd into uclouvain:master Jan 13, 2024
12 checks passed
@domin144 domin144 deleted the cmake_version_file branch February 20, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants