UseSWIG: Fix when Java is enabled as a language
Since !291 (merged) the generated .java
files are
listed as sources in the call to add_library
by swig_add_library.
They are listed only as the outputs of custom commands and not intended
for compilation as part of the library.