I am trying to use an external library that has recently started providing Config.cmake files for itself. Before this, cmake was providing a Find.cmake module for this library. The library provides an imported target that I can use in my cmake files, which is desired. The module Find does not.
Is there anyway I can tell cmake to ignore the Find.cmake file and only use the config scripts, so I can rely on using the imported target in my target_link_libraries() call?
Interestingly, when I provide a HINT to the find_package() call, cmake pulls in the imported target. Providing that same path in the CMAKE_PREFIX_PATH but omitting it from the find_package() does not pull in the target.
I’m not sure if this is a bug in cmake or a bug in the Find.cmake file.
Any thoughts on how to rectify this?