How to get a dependency's MAJOR version in CMake (for ffmpeg)?
I am using some ffmpeg code whose API is different in different ffmpeg versions, and I need to be able to handle both versions. To do that, I thought I could use macros, like the following: #ifdef FFMPEG_6 void someFunc(A) { ... } #else void someFunc(B) { ... } #endif I am using find_package(LIBAV REQUIRED) to get ffmpeg. How do I get the MAJOR version of it and set this macro properly?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.