added apple support to cmake file