Set location for dependencies specifying explicitly both the include and lib path. This permits to handle cases where the libraries are installed in lib64 instead of lib. fixes #17556 fixes #10842 closes #18150