windows: reduce chance of going over path limit in backend/vs
windows: reduce chance of going over path limit in backend/vs

When building with vs2019 (not ninja), a path length error will be thrown
if the path to a resource file is even remotely deep within the tree.

This is largely because the target name includes the string "Windows
resource for file 'full path'", which is then expanded twice (once for
the .vcxproj itself, and once for IntDir) and added to the full path.
When combined with the tiny path limits on Windows, it is easy to exceed
path limits.

This error is largely avoided by the ninja back-end. Unlike the
vs back-end, the ninja back-end does not use target.get_id() as part of
the project file path, nor does it use target.get_id() as part of
get_target_private_dir().

Example error:

error MSB4184: The expression "[MSBuild]::NormalizePath(
C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp,
f3f7317@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\,
f3f7317@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus.
vcxproj.CopyComplete)" cannot be evaluated. Path:
C:\src\mesonbuild\Misc\FreeRDP-master\client\X11\xfreerdp\xfreerdp\f3f7317
@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus\f3f7317
@@Windows resource for file
'Misc_FreeRDP-master_client_X11_xfreerdp_xfreerdp_xfreerdp.rc'@cus.
vcxproj.CopyComplete exceeds the OS max path limit.
The fully qualified file name must be less than 260 characters.

pexip/meson,mesonbuild/meson,QuLogic/meson,mesonbuild/meson,jpakkane/meson,pexip/meson,mesonbuild/meson,QuLogic/meson,mesonbuild/meson,pexip/meson,jpakkane/meson,mesonbuild/meson,QuLogic/meson,pexip/meson,mesonbuild/meson,pexip/meson,QuLogic/meson,pexip/meson,jpakkane/meson,mesonbuild/meson,QuLogic/meson,QuLogic/meson,jpakkane/meson,pexip/meson,pexip/meson,mesonbuild/meson,pexip/meson,jpakkane/meson,jpakkane/meson,jpakkane/meson,mesonbuild/meson,mesonbuild/meson,QuLogic/meson,jpakkane/meson,jpakkane/meson,QuLogic/meson,QuLogic/meson,pexip/meson