CMake: Fix libswresample version dependencies (fixes #1229)

This commit is contained in:
Vicki Pfau 2018-11-11 12:16:59 -08:00
parent 9262475cb4
commit e4c38de1fc
2 changed files with 2 additions and 6 deletions

View File

@ -149,6 +149,7 @@ Misc:
- Qt: Detect presence of GL_ARB_framebuffer_object
- Python: Minor API improvements
- Qt: Minor memory view tweaks
- CMake: Fix libswresample version dependencies (fixes mgba.io/i/1229)
0.7 beta 1: (2018-09-24)
- Initial beta for 0.7

View File

@ -535,12 +535,7 @@ if(USE_FFMPEG)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libavformat${LIBAVFORMAT_VERSION_MAJOR}|libavformat-ffmpeg${LIBAVFORMAT_VERSION_MAJOR}")
if(USE_LIBSWRESAMPLE)
string(REGEX MATCH "^[0-9]+" LIBSWRESAMPLE_VERSION_MAJOR ${libswresample_VERSION})
if(${libswresample_VERSION} EQUAL "3.1.100")
set(LIBSWRESAMPLE_VERSION_DEBIAN 3)
else()
math(EXPR LIBSWRESAMPLE_VERSION_DEBIAN "${LIBSWRESAMPLE_VERSION_MAJOR} - 1")
endif()
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libswresample${LIBSWRESAMPLE_VERSION_DEBIAN}|libswresample-ffmpeg${LIBSWRESAMPLE_VERSION_DEBIAN}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libswresample${LIBSWRESAMPLE_VERSION_MAJOR}|libswresample-ffmpeg${LIBSWRESAMPLE_VERSION_MAJOR}")
else()
string(REGEX MATCH "^[0-9]+" LIBAVRESAMPLE_VERSION_MAJOR ${libavresample_VERSION})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libavresample${LIBAVRESAMPLE_VERSION_MAJOR}|libavresample-ffmpeg${LIBAVRESAMPLE_VERSION_MAJOR}")