[CMake] Added new SDK  autodetection for easier third-party management
Factorized and cleaned up the main CMakeLists.txt files.