diff options
-rw-r--r-- | Modules/UseSWIG.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 8424a9f..7460932 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -308,7 +308,7 @@ function(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile) endif() foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSIONS}) set(extra_file "${generatedpath}/${module_basename}${it}") - if (extra_file MATCHES "\\.cs$") + if (extra_file MATCHES "\\.cs$" AND CMAKE_CSharp_COMPILER_LOADED) set_source_files_properties(${extra_file} PROPERTIES LANGUAGE "CSharp") else() # Treat extra outputs as plain files regardless of language. |