The orginal patch has been reworked in order to follow CMake source tree layout habit. Inspired-By: Igor Murzov <e-mail@date.by>