improved cmake library examples