v.23.8Build/Testing/Packaging Improvement

Slight CMake Build Improvements: Dependency Sanitization and Duplicate Removal

Slightly improve cmake build by sanitizing some dependencies and removing some duplicates. Each commit includes a short description of the changes made. #53759 (Amos Bird).