[CMake] Prune redundant libdeps.