cmake: refactor libdabba test build/registration.

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>