Updating `test/CMakelists.txt`.

Populating Check libraries conditional on them being found.