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

Export version for CMake #316

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

SunBlack
Copy link
Contributor

@SunBlack SunBlack commented Dec 3, 2024

This allows requesting a minimum version.

E.g. when you have in your CMake:

find_package(E57Format 3.2.1 CONFIG REQUIRED)

And you have build this lib with this PR but the version number is still 3.2.0, you are getting

CMake Error at CMakeLists.txt:5 (find_package):
  Could not find a configuration file for package "E57Format" that is
  compatible with requested version "3.2.1".

  The following configuration files were considered but not accepted:

    .../lib/cmake/E57Format/e57format-config.cmake, version: 3.2.0

As there is a note that the changes to the legacy enums (which were changed in 2.x => 3.x) will only be removed with 4.x, I assume that SameMajorVersion is the best choice. For details see documentation (and example below)

@asmaloney asmaloney merged commit 9c864c2 into asmaloney:master Dec 3, 2024
8 of 12 checks passed
@asmaloney
Copy link
Owner

Thanks!

@SunBlack SunBlack deleted the CMake_export_version branch December 4, 2024 08:09
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