SFML community forums
Help => General => Topic started by: Sub on May 28, 2021, 01:51:14 pm
-
Quite frankly, I am baffled by cmake and always have been. Any help would be appreciated.
I am attempting to break out the MinimalistDemo (https://github.com/Yalir/sfeMovie/tree/master/examples/MinimalistDemo) example in sfeMovie (https://github.com/Yalir/sfeMovie) into an independent cmake project on Linux (Windows too after I get it working on Linux).
I have compiled working binaries of sfeMovie and the examples without issue, linking against SFML 2.5.1 and the bundled ffmpeg in the sfeMovie repo. Now I am trying to link against this in a new cmake project.
Here is a link to the blank repo I am trying to integrate sfeMovie with (https://github.com/danieljpetersen/sfeMovie-cmake-blank-template)
I can compile the project, but when I launch it, I get the error: "error while loading shared libraries: libavformat.so.56: cannot open shared object file: No such file or directory"
Thing is, that file exists and is in /usr/local/lib
I'd like to distribute the ffmpeg and sfeMovie shared libraries alongside the executable binary.
Here's a screenshot of what cmake looks like after configuring.
(https://i.imgur.com/zco67Ld.png)
FFMPEG_ROOT is not set, which I imagine is a problem, but when I go to manually set it cmake says that it's deprecated and I need to explicitly reenable it. I have done this, and it no longer complains about that, but it had no effect. I'm assuming the proper directory here would be the sfeMovie/ffmpeg directory?
-
Exploiter solved this for me. I simply had to set $LD_LIBRARY_PATH to the location of libraries. RPath should allow for me to set the path of the shared libraries to be in a directory relative to the binary.
Thank you again exploiter