From acc59e55e12c1979735ba42569411892e215afba Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Sun, 24 Nov 2013 17:54:59 +0100 Subject: UseSWIG: Handle a dll name different than module name (#13814) --- Modules/UseSWIG.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 00f3e21..f957399 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -68,6 +68,10 @@ macro(SWIG_MODULE_INITIALIZE name language) set(SWIG_MODULE_${name}_REAL_NAME "_${name}") elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "PERL") set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow") + elseif("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "CSHARP") + # This makes sure that the name used in the generated DllImport + # matches the library name created by CMake + set(SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport;${name}") endif() endmacro() -- cgit v0.12