fails at compile time if sqlite3 is missing
libcgi switched to CMake with v1.1 (see https://github.com/rafaelsteil/libcgi/releases for recent version), cross-compiling works different than with autotools, but it works. If you need fixed cross compilation for v1.0, see libcgi package in older releases of buildroot or ptxdist, which both had patches for that.
This was fixed in v1.1. See GitHub for recent releases: https://github.com/rafaelsteil/libcgi/releases