I want to build ffmpeg with support for the av1 codec on CentOS 7. I start by following the instructions here:

git clone https://aomedia.googlesource.com/aom
mkdir aom_build
cd aom_build
cmake ../aom
sudo make install

This writes a file to /usr/local/lib64/pkgconfig/aom.pc. When I later clone ffmpeg's git repo and try to run ./configure --enable-libaom ..., it complains that pkg-config can't find the aom.pc file.

This is because if I run pkg-config --variable pc_path pkg-config, I can see that pkg-config only checks here:


It doesn't look in /usr/local/lib64/pkgconfig, where aom.pc is. So far, the only fix I've come up with is to run this instead in ffmpeg's git directory:

PKG_CONFIG_PATH=$PKG_CONFIG_PATH/usr/local/lib64/pkgconfig: ./configure --enable-libaom ...

This works, but I'd rather just tell libaom to write aom.pc to /usr/lib64/pkgconfig in the first place.

Is there any way, when building aom, to tell cmake or make to write the aom.pc file to /usr/lib64/pkgconfig instead of /usr/local/lib64/pkgconfig?

In other projects that have a ./configure step, I've seen it possible to specify this with ./configure --pkgconfigdir=/usr/lib64/pkgconfig, but the aom project doesn't have a ./configure script, so I'm not sure what to do here.


1 Answer 1


You would liked to run a custom cmake for libaom something like this:

cmake .. -DCMAKE_INSTALL_PREFIX="./extra_ff_mods" -DCMAKE_INSTALL_LIBDIR=lib
make install

This will place the files in folder called extra_ff_mods and that will contains following sub folders:

- include
- lib
   - pkgconfig

You can change the destination folder as appropriate

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .