Export CMake targets to the build tree

Properly export Ogg target when added via `add_subdirectory()`.
2 jobs for master in 50 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Build
passed autoconf #10893
docker

00:00:50

passed cmake #10894
docker

00:00:20