[cmake-developers] On-going UseSWIG troubles with the official versions --SOLVED

Brad King brad.king at kitware.com
Tue Apr 25 08:54:34 EDT 2017


On 04/25/2017 04:08 AM, Alan W. Irwin wrote:
> set PREFIX to "" for all languages not specifically covered by the if
> and elseif blocks.

Do you mean

```
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 277f4ca28a..bfe1a6f754 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -326,6 +326,9 @@ macro(SWIG_ADD_LIBRARY name)
     if (APPLE)
       set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".bundle")
     endif ()
+  else()
+    # assume empty prefix because we expect the module to be dynamically loaded
+    set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
   endif ()
 endmacro()
```

?

-Brad



More information about the cmake-developers mailing list