cmake: restore a "exiv2lib" target

Commit a8c3455e5c and
commit eb05551ed2 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
main
Pino Toscano 2 years ago committed by Rosen Penev
parent 81b0f36e43
commit 130064dc76

@ -14,3 +14,6 @@ endif()
include("${CMAKE_CURRENT_LIST_DIR}/exiv2Export.cmake") include("${CMAKE_CURRENT_LIST_DIR}/exiv2Export.cmake")
check_required_components(exiv2) check_required_components(exiv2)
# compatibility with non-aliased users
add_library(exiv2lib ALIAS Exiv2::exiv2lib)

Loading…
Cancel
Save