Honor BUILD_TESTING
Only build tests if BUILD_TESTING is on. Also remove unnecesary if() that checked for packages which are always required.
Differential Revision: https://phabricator.kde.org/D13973