Cmake move dependency discovery

Moving the dependency discovery to the root CMakeLists.txt makes them available in tools/ and binding projects as well.  This is important when someone uses custom install location for these dependencies, as otherwise for example their include directories are not used/available for the compilation of the tools binaries.

This fixes #1047 .