This question is similar to this but for a more specific case. (although that one doesn't have a verified answer.)
I have the following warning from CMake:
CMake Warning at CMake/XXXXX.macros.cmake:112 (add_executable):
Cannot generate a safe runtime search path for target
YYYYYYYY_bin because files in some directories may conflict
with libraries in implicit directories:
runtime library [libodbc.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/my_path/venv/lib
So libodbc.so.2
is present in 2 folders where loader may search.
I want to use the one in
/my_path/venv/lib
which makes part of a virtual environment that contains my dependencies.I'd like to avoid deleting the one in
/usr/lib/x86_64-linux-gnu
. But I have the feeling that the loader will always search there (maybe I'm wrong?).I'm not "manually" adding
/usr/lib/x86_64-linux-gnu
to the project.I use libraries like OpenCV, Boost and others coming from python with their own configuration/dependencies.
Is there a way of completely excluding /usr/lib/x86_64-linux-gnu
during cmake configuration?