Fixed warnings in previous commit.
Added dependencies check
Plugins: Setting CMAKE_BUILD_TYPE must appear before the project command