A little CMake cleanup

Look for sparkle, sphinx, pdflatex and cmocka only when necessary.