Separate OSX and iOS cmake configuration into module