Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Integrating sfeMovie with a blank cmake project  (Read 2935 times)

0 Members and 1 Guest are viewing this topic.

Sub

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Integrating sfeMovie with a blank cmake project
« 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 example in 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

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.


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?
« Last Edit: May 28, 2021, 01:56:50 pm by Sub »

Sub

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Integrating sfeMovie with a blank cmake project
« Reply #1 on: May 28, 2021, 02:35:30 pm »
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