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

cmake: restore a "exiv2lib" target #2832

Merged
merged 1 commit into from
Dec 10, 2023
Merged

Conversation

pinotree
Copy link
Contributor

@pinotree pinotree commented Nov 14, 2023

Commit a8c3455 and commit eb05551 changed the target of the exiv2 library (exiv2lib), exporting it in the Exiv2 namespace, so making it usable as Exiv2::exiv2lib instead. An ALIAS to exiv2lib was added, however cmake does not install or export ALIAS targets [1].

Hence, restore compatibility with the existing cmake users of exiv2: manually create an ALIAS target in the cmake config files after all the targets are loaded and checked.

[1] https://cmake.org/cmake/help/latest/command/add_library.html

Tested with digikam and photoqt, which refer to exiv2lib in their cmake build systems.

@ghost
Copy link

ghost commented Nov 14, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f551534) 63.88% compared to head (1d01500) 63.88%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2832   +/-   ##
=======================================
  Coverage   63.88%   63.88%           
=======================================
  Files         103      103           
  Lines       22381    22381           
  Branches    10873    10873           
=======================================
  Hits        14297    14297           
  Misses       5862     5862           
  Partials     2222     2222           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pinotree pinotree force-pushed the cmake-target-compat branch 2 times, most recently from 65322f3 to 4f6d0b8 Compare November 17, 2023 19:31
@pinotree pinotree force-pushed the cmake-target-compat branch from 4f6d0b8 to e793201 Compare November 22, 2023 03:45
Commit a8c3455 and
commit eb05551 changed the target of
the exiv2 library ("exiv2lib"), exporting it in the "Exiv2" namespace,
so making it usable as "Exiv2::exiv2lib" instead. An ALIAS to "exiv2lib"
was added, however cmake does not install or export ALIAS targets [1].

Hence, restore compatibility with the existing cmake users of exiv2:
manually create an ALIAS target in the cmake config files after all the
targets are loaded and checked.

[1] https://cmake.org/cmake/help/latest/command/add_library.html
@pinotree pinotree force-pushed the cmake-target-compat branch from e793201 to 1d01500 Compare November 26, 2023 08:44
@neheb
Copy link
Collaborator

neheb commented Dec 7, 2023

ping @Ryanf55

@Ryanf55
Copy link
Contributor

Ryanf55 commented Dec 7, 2023

ping @Ryanf55

This is an issue if we lose the original target name; those changes were not intended to be breaking. But, I'm not sure this is the right fix. I can try an alternative fix. The targets are supposed to be generated automatically by the config script

Once we get the fix in, It would be prudent to add a test in CI to verify the targets the users expect exist.

@neheb neheb merged commit 130064d into Exiv2:main Dec 10, 2023
59 checks passed
@pinotree pinotree deleted the cmake-target-compat branch December 26, 2023 11:14
@pinotree
Copy link
Contributor Author

Would be possible to backport this to the 0.28.x branch, please?

@neheb
Copy link
Collaborator

neheb commented Dec 26, 2023

@Mergifyio backport 0.28.x

Copy link
Contributor

mergify bot commented Dec 26, 2023

backport 0.28.x

✅ Backports have been created

@kmilos kmilos added the CMake Configuration issues related with CMake label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Configuration issues related with CMake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants