Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
pinotree committed Nov 17, 2023
1 parent e8326ba commit 4f6d0b8
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
@@ -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 4f6d0b8

Please sign in to comment.