libadwaita-1-4: Fix build on Visual Studio

Chun-wei Fan requested to merge libadwaita-1-4-msvc into libadwaita-1-4


This attempts to fix builds on Visual Studio by:

  • Making the AppStream dependency optional, and hence make adw_about_window_new_from_appdata() use a stub implementation if AppStream is not found (and so, make the test for that function skipped).
  • Fix building adw-navigation-split-view.c when building update_navigation_stack(), as initializing an array with an empty array is not liked by Visual Studio.
  • Look for sh only after date has been found, and make it optional, since:
  • date may not be found nor run by Meson in cmd.exe builds (i.e. Visual Studio and clang-cl), even if it is a built-in command there.
  • sh may well be not available in cmd.exe shells, and one may have date.exe from ICU's sample programs, for instance.

With blessings, thank you!

Merge request reports