This is a diff split off from D5990, taking the corresponding comments into account.
Re: "use QStandardPaths::findExecutable() to look for "otool"; I don't see why this would be required for otool and not ldd. Also, the otool command needs an additional argument. So we can either do a runtime lookup if the otool command exists (= we're on Mac) or we can test at compile time if we'll be running on Mac. I think the latter is the more appropriate approach.