Export necessary headers for building DImg image loader plugins outside Digikam
Compiling DImg plugins for loading/saving of file formats, outside the Digikam project itself, is not possible because some necessary headers are not exported.
I used this merge request as a fix successfully up to, and including, Digikam 7.9.
Disclaimer: I cannot test it on later versions in the near future, but judging by a diff on the Digikam source code nothing relevant has changed. (Thanks!)