libyuv: fix libyuv.so not linking against libjpeg

This commit is contained in:
MidAutumnMoon 2022-11-19 12:06:58 +08:00
parent 5658def54f
commit ddd1e56610
No known key found for this signature in database
GPG Key ID: 3B9D690FD7E4664A
2 changed files with 14 additions and 1 deletions

View File

@ -24,7 +24,9 @@ stdenv.mkDerivation rec {
buildInputs = [ libjpeg ];
NIX_CFLAGS_LINK = lib.optional stdenv.isDarwin "-ljpeg";
patches = [
./link-library-against-libjpeg.patch
];
meta = with lib; {
homepage = "https://chromium.googlesource.com/libyuv/libyuv";

View File

@ -0,0 +1,11 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 636531ee..af1b0e4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,7 @@ INCLUDE ( FindJPEG )
if (JPEG_FOUND)
include_directories( ${JPEG_INCLUDE_DIR} )
target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
+ target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} )
add_definitions( -DHAVE_JPEG )
endif()