[CMake] Fix all issues with dependencies, remove useless