Skip to content

FindOpenSP: Export the full path with OpenSP_LIBRARY

Kefu Chai requested to merge tchaikov/cmake:find-opensp-lib-fullpath into master

The document reads:

OpenSP_LIBRARY the absolute path of the osp library

But if OpenSP is found with pkg_check_modules(..), the value of OpenSP_LIBRARY would be a string like "osp", but this is not a fullpath and cannot be directly used by linker or compiler. in general, compiler would expect something like "-losp" along with "-L<path-to-libosp.so>".

So, in this change, OpenSP_LIBRARY is always set with find_library(..) even if pkg_check_modules(..) is able to find OpenSP. This should address the link failure if user uses OpenSP_LIBRARY instead of using the exported target library of OpenSP::OpenSP.

Signed-off-by: Kefu Chai tchaikov@gmail.com

Merge request reports