aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindFFmpeg.cmake
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-05-03 16:17:49 +0200
committerSven Gothel <[email protected]>2023-05-03 16:17:49 +0200
commitec167fd05661a5b02dd406c87081f84a0f8dd77d (patch)
tree9c4669e471c9969bda59265381b18d2d416db060 /cmake/FindFFmpeg.cmake
parent0d14d30808cfe7b9e3413353e3eef8a0f201399a (diff)
parentd3875f333fb6abe2f39d82caca329414871ae53b (diff)
Merge branch 'v1.23.1'
Resolved Conflicts: CMakeLists.txt
Diffstat (limited to 'cmake/FindFFmpeg.cmake')
-rw-r--r--cmake/FindFFmpeg.cmake26
1 files changed, 2 insertions, 24 deletions
diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake
index c489c2c3..26ed4d2f 100644
--- a/cmake/FindFFmpeg.cmake
+++ b/cmake/FindFFmpeg.cmake
@@ -80,30 +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.*")
-
- foreach(_str "${version_str}")
- if(NOT version_maj)
- string(REGEX REPLACE "^.*LIB${_component}_VERSION_MAJOR[\t ]+([0-9]*).*$" "\\1" version_maj "${_str}")
- endif()
- if(NOT version_min)
- string(REGEX REPLACE "^.*LIB${_component}_VERSION_MINOR[\t ]+([0-9]*).*$" "\\1" version_min "${_str}")
- endif()
- if(NOT version_mic)
- string(REGEX REPLACE "^.*LIB${_component}_VERSION_MICRO[\t ]+([0-9]*).*$" "\\1" version_mic "${_str}")
- endif()
- endforeach()
- 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})