diff options
author | Brad King <brad.king@kitware.com> | 2018-06-13 14:48:37 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-06-13 14:48:51 (GMT) |
commit | 0247f6836c9318396c91ec01dc682b12185a37e4 (patch) | |
tree | 3dbcbb795755c2de0587013c6135bba3ebcee7b4 /Modules/UseSWIG.cmake | |
parent | b7b4ace2bebd7d063b38c4537e67050628dc1c51 (diff) | |
parent | 0c2fb4c8964b6164c44e8641c8c9225369c0228b (diff) | |
download | CMake-0247f6836c9318396c91ec01dc682b12185a37e4.zip CMake-0247f6836c9318396c91ec01dc682b12185a37e4.tar.gz CMake-0247f6836c9318396c91ec01dc682b12185a37e4.tar.bz2 |
Merge topic 'UseSWIG-csharp-variant'
0c2fb4c896 UseSWIG: Add CSHARP variant for wrapper files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2137
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r-- | Modules/UseSWIG.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 54b90c3..7127b8f 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -189,6 +189,7 @@ set(SWIG_EXTRA_LIBRARIES "") set(SWIG_PYTHON_EXTRA_FILE_EXTENSIONS ".py") set(SWIG_JAVA_EXTRA_FILE_EXTENSIONS ".java" "JNI.java") +set(SWIG_CSHARP_EXTRA_FILE_EXTENSIONS ".cs" "PINVOKE.cs") ## ## PRIVATE functions @@ -263,10 +264,14 @@ 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$") + set_source_files_properties(${extra_file} PROPERTIES LANGUAGE "CSharp") + else() + # Treat extra outputs as plain files regardless of language. + set_source_files_properties(${extra_file} PROPERTIES LANGUAGE "") + endif() list(APPEND files "${extra_file}") endforeach() - # Treat extra outputs as plain files regardless of language. - set_source_files_properties(${files} PROPERTIES LANGUAGE "") set (${outfiles} ${files} PARENT_SCOPE) endfunction() |