zimg
zimg copied to clipboard
How to build static library and integration to ffmpeg?
libzimg.a is now compiled, pkgconfig like this
prefix=/home/third_party/prebuild/third_party/zimg/deploy
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: zimg
Description: Scaling, colorspace conversion, and dithering library
Version: 3.0.5
# If building a static library against a C++ runtime other than libstdc++,
# define STL_LIBS when running configure.
Libs: -L${libdir} -lzimg
Libs.private: -lstdc++
Cflags: -I${includedir}
ffmpeg shell like this
./configure \
--extra-cflags=-fpic \
--extra-cxxflags=-fpic \
--prefix="${workdir}/deploy/" \
--enable-shared \
--enable-filters \
--enable-filter=zscale \
--enable-libzimg \
--extra-cflags="-I$x264_dir/include -I$libvpx_dir/include -I$zimg_dir/include" \
--extra-ldflags="-L$x264_dir/lib -L$libvpx_dir/lib -L$zimg_dir/lib" && \
make -j 12 && \
make install
But if you link static libraries, it will appear ERROR: zimg >= 2.7.0 not found using pkg-config, but link dynamic library is ok. why? I've set export PKG_CONFIG_PATH=${zimg_pkg_dir} , I'm sure zimg_pkg_dir is the right path.