OTB 6.6-rc1 fails to build on Debian unstable (error while loading shared libraries: libOTBApplicationEngine-6.6.so.1: cannot open shared object file: No such file or directory)
Description
OTB 6.6-rc1 fails to build on Debian unstable because it cannot find libOTBApplicationEngine-6.6.so.1:
"/build/otb-6.6.0~rc1+dfsg/obj-x86_64-linux-gnu/bin/otbQgisDescriptor" MultivariateAlterationDetector "/build/otb-6.6.0~rc1+dfsg/obj-x86_64-linux-gnu/lib/otb/applications" "/build/otb-6.6.0~rc1+dfsg/obj-x86_64-linux-gnu/share/otb/description/"
/build/otb-6.6.0~rc1+dfsg/obj-x86_64-linux-gnu/bin/otbQgisDescriptor: error while loading shared libraries: libOTBApplicationEngine-6.6.so.1: cannot open shared object file: No such file or directory
make[3]: *** [Modules/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/build.make:160: share/otb/description/MultivariateAlterationDetector.txt] Error 127
make[3]: Leaving directory '/build/otb-6.6.0~rc1+dfsg/obj-x86_64-linux-gnu'
make[2]: *** [CMakeFiles/Makefile2:16797: Modules/Wrappers/QGIS/src/CMakeFiles/generate_descriptors.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
It looks like the build should use the the libraries from the build, not the system installed ones.
Steps to reproduce
Build OTB 6.6-rc1 with -DOTB_USE_SHARK:BOOL=OFF
on Debian unstable.
Configuration information
Debian unstable, OTB 6.6-rc1.