Cmake tweaks to get the right includes and libraries linked