Defines the following macros for use with SWIG:
Define swig module with given name and specified language:
swig_add_library(<name>
[TYPE <SHARED|MODULE|STATIC|USE_BUILD_SHARED_LIBS>]
LANGUAGE <language>
SOURCES <file>...
)
The variable SWIG_MODULE_<name>_REAL_NAME will be set to the name of the swig module target library.
Link libraries to swig module:
swig_link_libraries(<name> [ libraries ])
Source file properties on module files can be set before the invocation of the swig_add_library macro to specify special behavior of SWIG:
Call SWIG in c++ mode. For example:
set_property(SOURCE mymod.i PROPERTY CPLUSPLUS ON)
swig_add_library(mymod LANGUAGE python SOURCES mymod.i)
Specify the actual import name of the module in the target language. This is required if it cannot be scanned automatically from source or different from the module file basename. For example:
set_property(SOURCE mymod.i PROPERTY SWIG_MODULE_NAME mymod_realname)
Some variables can be set to specify special behavior of SWIG: