SWIG: do not list SWIG library files in dependencies files

(cherry picked from commit 439bdeb7aa661f4b4d480b723a2abf006d4ca198)
SWIG: check version of SWIG used to generate source files

(cherry picked from commit bc694a8a031938e2707caf857b070af5b7381043)