cmake: Don't enable unittests on external projects that lack them

This removes error messages during build time.