Fix the OSX cross build:
- Cleanup the platform file by using CMake built-in features for
sysroot and deployment target.
- Use CMAKE_<LANG>_FLAGS_INIT (note the _INIT) variables to set the
target. This variable will set the corresponding CMAKE_<LANG>_FLAGS
variable, but is also used to initalized the CMAKE_REQUIRED_FLAGS for
various check_xxx functions such as check_include_file() or
check_symbol_exist(). This fixes the architecture mismatch issue.
- Add OSX only Qt files (*.mm) to the build.
- A bug in the CMake files distributed by Qt prevent building with
static OpenGL on OSX (hard linked dependency to the framework in the
Qt5Gui dependencies). To workaround the issue, the static Qt is built
without the OpenGL support.
Depends on D3017