cmake: Fix building for macOS with Xcode generator (thanks, dungaipara!).

Fixes Bugzilla #3625.
1 file changed