aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindFFmpeg.cmake
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-08-20 20:59:15 -0700
committerChris Robinson <[email protected]>2022-08-20 20:59:15 -0700
commit6815926cc52e66bb2d27c1f0cfddb385c9e279e4 (patch)
tree78444a269968f1ee4a9ab542167fecb2fb91beeb /cmake/FindFFmpeg.cmake
parentdf337465714d9326f7f4be128b1adfe1ce16973f (diff)
Update alffplay to support newer ffmpeg versions
Diffstat (limited to 'cmake/FindFFmpeg.cmake')
-rw-r--r--cmake/FindFFmpeg.cmake18
1 files changed, 2 insertions, 16 deletions
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
index 60ca68fd..26ed4d2f 100644
--- a/cmake/FindFFmpeg.cmake
+++ b/cmake/FindFFmpeg.cmake
@@ -80,22 +80,8 @@ macro(find_component _component _pkgconfig _library _header)
${PC_LIB${_component}_LIBRARY_DIRS}
)
- STRING(REGEX REPLACE "/.*" "/version.h" _ver_header ${_header})
- if(EXISTS "${${_component}_INCLUDE_DIRS}/${_ver_header}")
- file(STRINGS "${${_component}_INCLUDE_DIRS}/${_ver_header}" version_str REGEX "^#define[\t ]+LIB${_component}_VERSION_M.*")
-
- string(REGEX REPLACE "^.*LIB${_component}_VERSION_MAJOR[\t ]+([0-9]*).*$" "\\1" version_maj "${version_str}")
- string(REGEX REPLACE "^.*LIB${_component}_VERSION_MINOR[\t ]+([0-9]*).*$" "\\1" version_min "${version_str}")
- string(REGEX REPLACE "^.*LIB${_component}_VERSION_MICRO[\t ]+([0-9]*).*$" "\\1" version_mic "${version_str}")
- unset(version_str)
-
- set(${_component}_VERSION "${version_maj}.${version_min}.${version_mic}" CACHE STRING "The ${_component} version number.")
- unset(version_maj)
- unset(version_min)
- unset(version_mic)
- endif(EXISTS "${${_component}_INCLUDE_DIRS}/${_ver_header}")
- set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number.")
- set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS.")
+ set(${_component}_VERSION ${PC_${_component}_VERSION} CACHE STRING "The ${_component} version number." FORCE)
+ set(${_component}_DEFINITIONS ${PC_${_component}_CFLAGS_OTHER} CACHE STRING "The ${_component} CFLAGS." FORCE)
set_component_found(${_component})