Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_library should have PATHS for FFMpeg components, and allow user to specify those (or switch to PkgConfig for that) #691

Open
barracuda156 opened this issue Jul 6, 2024 · 0 comments

Comments

@barracuda156
Copy link
Contributor

Setting include path is not sufficient to find libraries of FFMpeg, when those are not in default paths.

What is needed is either of the following:

  1. Use PkgConfig to set correct paths for FFMpeg.
  2. Allow user to define paths explicitly, and that should also be done for libraries, not only for includes.

For example, this works:

include_directories("/opt/local/libexec/ffmpeg7/include")
find_library(AVCODEC NAMES avcodec PATHS /opt/local/libexec/ffmpeg7/lib)

While trying it without PATHS specified results in configure error (even when include_directories points to the correct path):

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
AVCODEC
    linked by target "ffmpegdecoder" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/ffmpegdecoder
    linked by target "stockencoders" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/stockencoders
AVFORMAT
    linked by target "ffmpegdecoder" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/ffmpegdecoder
    linked by target "stockencoders" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/stockencoders
AVUTIL
    linked by target "ffmpegdecoder" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/ffmpegdecoder
    linked by target "stockencoders" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/stockencoders
SWRESAMPLE
    linked by target "ffmpegdecoder" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/ffmpegdecoder
    linked by target "stockencoders" in directory /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_multimedia_musikcube/musikcube/work/musikcube-3.0.3/src/plugins/stockencoders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant