I have those two lines in my Slackbuild:
EXTRA_LIBS=" -lOpenCL -lSvtAv1Enc -lvpl -ldav1d -lxvidcore -lass -lbluray -lsnappy -lzimg" \
FFMPEG_EXTRA_CFG=" --enable-libvpl --disable-doc --enable-opencl --enable-libsvtav1 --enable-frei0r --enable-libdav1d --enable-libzimg --enable-libxvid --enable-libass --enable-libbluray --enable-libsnappy --disable-debug --extra-cflags=-I/usr/local/include/vpl --extra-cflags=-I/usr/include/svt-av1"
note that you can add two --extra-cflags here.
with those settings and self-compiled libvpl (into /usr/local) I can debug qsv profiles a bit further.
At least encoder now recognized and Pixels dropdown menu correctly populated.
Rule here is to add --enable-x, includes into FFMPEG_EXTRA_CFG
and -llib1, -llib2 libraries for linker into EXTRA_LIBS environment variable
A bit convolved for manual setup, but put it into script ...