Skip to content

Commit

Permalink
cmake: restore a "exiv2lib" target
Browse files Browse the repository at this point in the history
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

(cherry picked from commit 130064d)
  • Loading branch information
pinotree authored and neheb committed Dec 26, 2023
1 parent 3076cc6 commit 768ef30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/exiv2Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ endif()
include("${CMAKE_CURRENT_LIST_DIR}/exiv2Export.cmake")

check_required_components(exiv2)

# compatibility with non-aliased users
add_library(exiv2lib ALIAS Exiv2::exiv2lib)

0 comments on commit 768ef30

Please sign in to comment.