qtkeychain
qtkeychain copied to clipboard
CMake < 18 support is broken since 0.13
This has happened due to https://github.com/frankosterfeld/qtkeychain/commit/70a567abc59d11d2b1c87fcb8b7763365b3a5365 which requires CMake >= 18.0
CMake Error at /Users/runner/buildenv/mixxx-deps-2.4-arm64-osx-min11.0-0275662/scripts/buildsystems/vcpkg.cmake:578 (_add_library):
_add_library cannot create ALIAS target "Qt5Keychain::Qt5Keychain" because
target "qt5keychain" is imported but not globally visible.
An easy fix would be to add a version guard around the ALIAS creation.
An alternative is proposed in the related CMake issue https://gitlab.kitware.com/cmake/cmake/-/issues/20641
-add_library(Qt@QTKEYCHAIN_VERSION_INFIX@Keychain::Qt@QTKEYCHAIN_VERSION_INFIX@Keychain ALIAS qt@QTKEYCHAIN_VERSION_INFIX@keychain)
+add_library(Qt@QTKEYCHAIN_VERSION_INFIX@Keychain::Qt@QTKEYCHAIN_VERSION_INFIX@Keychain INTERFACE IMPORTED)
+target_link_libraries(Qt@QTKEYCHAIN_VERSION_INFIX@Keychain::Qt@QTKEYCHAIN_VERSION_INFIX@Keychain INTERFACE qt@QTKEYCHAIN_VERSION_INFIX@keychain
Is this equivalent?
I can't judge if the latter is equivalent. I'd be fine with the version guard, as it should be the safe option. Unless someone can confirm that the latter is safe, too...