mpeg5 / xevd

eXtra-fast Essential Video Decoder, MPEG-5 EVC (Essential Video Coding)
Other
71 stars 22 forks source link

src_main: Add libm link for xevd_dynamic #70

Closed toonn closed 2 months ago

toonn commented 2 months ago

We run into the following error when building ffmpeg with xevd support unless we explicitly pass -lm in CFLAGS:

ERROR: xevd >= 0.4.1 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

With help I've tracked this down to src_main/CMakeLists.txt specifying target_link_libraries(${LIB_NAME} m) only for the static library target and not the shared library.

By specifying the dependency for the shared library too the resulting libxevd.so contains a proper reference to a libm.so, which means downstream doesn't need to provide -lm.