make generated cmake relocatable

@tfoote Please review and merge.