Fixed dependencies issues with CMake.