UseSWIG: Account for per-config subdir of multi-config generators
The underlying problem is that the default output directory
(specified in two separate places in
UseSWIG.cmake) did not
account for config-specific subdirectories of multi-config
generators. This change addresses that and also fixes a similar
error in some of the Python tests.
I have verified that the changes now pass with the Xcode generator and the non-Perl tests pass with the Visual Studio generator. I have been unable to test the perl cases on Windows due to problems getting FindPerlLibs to work with my Strawberry Perl install.
This is an alternative solution to the one proposed in !1934 (merged)