update cmake build rule for mac osx