Further dependency build improvements.

May require clearing CMake caches.