Hi,
I want to contribute this patch to correct CMake configuration and make it more similar to the other build configuration. I tested it only in Linux so Windows might require testing/fixing. It is a git patch over current master.
Regards,
Alejandro