Skip to content

Commit

Permalink
pkgconf: Add yuv library in Libs.private for static linking
Browse files Browse the repository at this point in the history
libyuv was not added in Requires.private because it does not provide pkgconfig file officially
  • Loading branch information
Biswa96 committed Dec 28, 2023
1 parent 89468f8 commit 9016cf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ option(AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP
)
option(AVIF_ENABLE_EXPERIMENTAL_AVIR "Enable experimental reduced header" OFF)

set(AVIF_PKG_CONFIG_EXTRA_LIBS_PRIVATE "")
set(AVIF_PKG_CONFIG_EXTRA_REQUIRES_PRIVATE "")

function(set_local_or_system_option VAR DEFAULT TEXT)
Expand Down Expand Up @@ -222,6 +223,7 @@ endif()
if(AVIF_LIBYUV_ENABLED)
target_compile_definitions(avif_obj PRIVATE -DAVIF_LIBYUV_ENABLED=1)
avif_target_link_library(yuv::yuv)
set(AVIF_PKG_CONFIG_EXTRA_LIBS_PRIVATE "${AVIF_PKG_CONFIG_EXTRA_LIBS_PRIVATE} -lyuv")
endif(AVIF_LIBYUV_ENABLED)

set_local_or_system_option("LIBSHARPYUV" "OFF" "Use libsharpyuv.")
Expand Down
1 change: 1 addition & 0 deletions libavif.pc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name: @PROJECT_NAME@
Description: Library for encoding and decoding .avif files
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lavif
Libs.private:@AVIF_PKG_CONFIG_EXTRA_LIBS_PRIVATE@
Cflags: -I${includedir}@AVIF_PKG_CONFIG_EXTRA_CFLAGS@
Cflags.private: -UAVIF_DLL
Requires.private:@AVIF_PKG_CONFIG_EXTRA_REQUIRES_PRIVATE@

0 comments on commit 9016cf9

Please sign in to comment.