mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[cmake] Fix finding ffmpeg under nonstandard prefixes
The prefix given to pkg_check_modules is PC_${_component}, not
PC_LIB${_component}, so those variables were always read as empty, thus
no HINTS were passed to the find_* functions and ffmpeg could not be
found if it was not in a default path.
This commit is contained in:
@@ -96,12 +96,12 @@ macro(find_component _component _pkgconfig _library _header)
|
||||
endif()
|
||||
endif(NOT WIN32)
|
||||
|
||||
find_path(${_component}_INCLUDE_DIRS ${_header} HINTS ${PC_LIB${_component}_INCLUDEDIR}
|
||||
${PC_LIB${_component}_INCLUDE_DIRS} PATH_SUFFIXES ffmpeg
|
||||
find_path(${_component}_INCLUDE_DIRS ${_header} HINTS ${PC_${_component}_INCLUDEDIR}
|
||||
${PC_${_component}_INCLUDE_DIRS} PATH_SUFFIXES ffmpeg
|
||||
)
|
||||
|
||||
find_library(
|
||||
${_component}_LIBRARIES NAMES ${_library} HINTS ${PC_LIB${_component}_LIBDIR} ${PC_LIB${_component}_LIBRARY_DIRS}
|
||||
${_component}_LIBRARIES NAMES ${_library} HINTS ${PC_${_component}_LIBDIR} ${PC_${_component}_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
|
||||
|
||||
Reference in New Issue
Block a user