Skip to content

Conversation

ShinyMacadamia
Copy link

This PR aims to resolve this issue:
#157
In order to resolve it, i conditionally check whether PC_FFMPEG_LIBRARY_DIRS and PC_FFMPEG_INCLUDE_DIRS are present. If library is found, it sets the variables manually:

        set(${_component}_LIBRARY_DIRS ${PC_FFMPEG_LIBRARY_DIRS} CACHE STRING "The ${_component} library dirs.")
        set(${_component}_LIBRARIES ${_library} CACHE STRING "The ${_component} libraries.")

I'm almost certain this also should be checked and set manually in case PC_FFMPEG_INCLUDE_DIRS is present:

      find_path(${_component}_INCLUDE_DIRS ${_header}
            HINTS
            ${PC_${_component}_INCLUDEDIR}
            ${PC_${_component}_INCLUDE_DIRS}
            ${PC_FFMPEG_INCLUDE_DIRS}
            PATH_SUFFIXES
            ffmpeg
    )

like this:

    find_path(${_component}_INCLUDE_DIRS ${_header}
         PATHS
         ${PC_FFMPEG_INCLUDE_DIRS}
         NO_DEFAULT_PATH
         REQUIRED # perhaps?
)

About formatting. I didn't find any cmake-format configs in the repo. Because of this, cmake-formatter with my own settings was applied. I'm not even sure how to format this exact cmake file.
Any suggestions are appreciated!

@ShinyMacadamia ShinyMacadamia changed the title Fix/custom path Fix custom header/libraray path Sep 3, 2025
@h4tr3d
Copy link
Owner

h4tr3d commented Sep 26, 2025

@ShinyMacadamia thanks for PR! But, could you please remove formatting changes and keep only logic changes? Thanks!

About formatting. I didn't find any cmake-format configs in the repo. Because of this, cmake-formatter with my own settings was applied. I'm not even sure how to format this exact cmake file.

Just omit formatting changes in the code that should not be changed. I see, that formatting not to clean but it should be fixed in separate step, without any logic changes.

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

Successfully merging this pull request may close these issues.

3 participants