cmake: export Qt5_DIR on Windows and macOS
This extra check is now needed because these platforms are
MUST_USE_SYSTEM
which precludes the option from existing.
This extra check is now needed because these platforms are
MUST_USE_SYSTEM
which precludes the option from existing.