If you want to distribute the artifacts, you have to install then (see install() command). The installation process handle to update binaries (or relink them) to enable portable usage…
See also various RPATH variables and properties to control the way libraries are linked.
CMake vastly prefers to say “use this file” rather than (re-)construct a set of flags to lead the linker to the same conclusion. What’s the problem that using full paths causes?
In what way? Can you provide the readelf -d $lib output of the file that fails when using full paths? A missing SONAME could cause something like this (though I’m not familiar with embedded idiosyncrasies).
I have edited /etc/ld.so.conf.to add libA.so in the LD_LIBRARY_PATH .
But it doesn’t work, That’s why I would like to delete the path projects/LibA projects/LibB projects/LibC
I would suggest instead setting a SONAME for those libraries. Alternatively, you can change their LIBRARY_OUTPUT_DIRECTORY property to place them in a better location in the build tree to avoid these paths. But the SONAME is the better solution here.
Are you installing the project to a local directory prior to distributing it to the remote system? That should be preferred (instead of taking the binaries directly from the build tree).
That’s weird as it’s set in uncoditional in Platform/Linux.cmake. Does your toolchain file properly setup cross-compiling to Linux, e.g. sets CMAKE_SYSTEM_NAME?