[Insight-users] Building CableSwig (outside ITK)

Darren Weber darren.weber.lists at gmail.com
Mon May 4 19:33:17 EDT 2009


I'm trying to package CableSwig for macports.  The cswig binary looks for SWIG
Lib in the source directory.  How is that re-configured?

The information available seems fairly basic, ie:
http://www.itk.org/ITK/resources/CableSwig.html

The build works, using the following build options:

configure.args \
    -DCMAKE_OSX_SYSROOT=${universal_sysroot} \
    -DCMAKE_BUILD_TYPE:STRING=Release \
    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
    -DCMAKE_INSTALL_RPATH:STRING=${prefix}/lib/CableSwig \
    -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
    -DCMAKE_INCLUDE_PATH:PATH=${prefix}/include \
    -DCMAKE_LIBRARY_PATH:PATH=${prefix}/lib \
    -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
    -DCSWIG_USE_SYSTEM_GCCXML:BOOL=ON

MacPorts uses an install DESTROOT for the package management system.  After
the make install, the DESTROOT looks like this:

destroot/opt/local
destroot/opt/local/bin
destroot/opt/local/bin/cableidx
destroot/opt/local/bin/cswig
destroot/opt/local/lib
destroot/opt/local/lib/CableSwig
destroot/opt/local/lib/CableSwig/CableSwigConfig.cmake
destroot/opt/local/lib/CableSwig/SWIGLib
destroot/opt/local/lib/CableSwig/SWIGLib/_std_deque.i
destroot/opt/local/lib/CableSwig/SWIGLib/allkw.swg
destroot/opt/local/lib/CableSwig/SWIGLib/carrays.i
destroot/opt/local/lib/CableSwig/SWIGLib/cdata.i
destroot/opt/local/lib/CableSwig/SWIGLib/cmalloc.i
destroot/opt/local/lib/CableSwig/SWIGLib/common.swg
destroot/opt/local/lib/CableSwig/SWIGLib/constraints.i
destroot/opt/local/lib/CableSwig/SWIGLib/cpointer.i
destroot/opt/local/lib/CableSwig/SWIGLib/cstring.i
destroot/opt/local/lib/CableSwig/SWIGLib/exception.i
destroot/opt/local/lib/CableSwig/SWIGLib/java
destroot/opt/local/lib/CableSwig/SWIGLib/java/arrays_java.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/director.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/java.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/javahead.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/javakw.swg
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_map.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_pair.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_string.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/std_vector.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/typemaps.i
destroot/opt/local/lib/CableSwig/SWIGLib/java/various.i
destroot/opt/local/lib/CableSwig/SWIGLib/math.i
destroot/opt/local/lib/CableSwig/SWIGLib/pointer.i
destroot/opt/local/lib/CableSwig/SWIGLib/python
destroot/opt/local/lib/CableSwig/SWIGLib/python/argcargv.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/ccomplex.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/complex.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/complex_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/cstring.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/defarg.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/director.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/embed.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/embed15.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/fragments.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/precommon.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pymisctypes.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyobject.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyopers.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyprimtypes.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyrun.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pystrings.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyswigtype.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/python.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pythonkw.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyvaltypes.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/pyvoid.swg
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_complex.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_deque.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_list.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_map.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_pair.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_string.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/std_vector.i
destroot/opt/local/lib/CableSwig/SWIGLib/python/typemaps.i
destroot/opt/local/lib/CableSwig/SWIGLib/std_deque.i
destroot/opt/local/lib/CableSwig/SWIGLib/stl.i
destroot/opt/local/lib/CableSwig/SWIGLib/swig.swg
destroot/opt/local/lib/CableSwig/SWIGLib/swigrun.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/cstring.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/precommon.swg
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_common.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_map.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_pair.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_string.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/std_vector.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/swigtcl8.swg
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/tcl8.swg
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/tcl8kw.swg
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/tclsh.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/typemaps.i
destroot/opt/local/lib/CableSwig/SWIGLib/tcl/wish.i


The final path for installation is the /opt/local tree (just remove the
destroot/).  Once the final install is done (macports copies files from the
DESTROOT - the final install is not handled by gmake), the source and build
paths are completely removed.  Once they are removed, the binary for cswig
fails, ie:

[ me at XXX ~ ]# cswig -help
Target Language Options:
     -chicken        - Generate CHICKEN wrappers
     -csharp         - Generate C# wrappers
     -guile          - Generate Guile wrappers
     -java           - Generate Java wrappers
     -mzscheme       - Generate Mzscheme wrappers
     -ocaml          - Generate Ocaml wrappers
     -perl           - Generate Perl wrappers
     -php            - Generate PHP wrappers
     -pike           - Generate Pike wrappers
     -python         - Generate Python wrappers
     -ruby           - Generate Ruby wrappers
     -sexp           - Generate Lisp S-Expressions wrappers
     -tcl            - Generate Tcl wrappers
     -xml            - Generate XML wrappers
Cannot find SWIG Lib directory.  Checked:

/opt/local/var/macports/build/_Users_dweber_ports_devel_cableswig/work/CableSwig-cvs/SWIG/Lib


How is this re-configured?  I don't see any cmake variables to control this.

Thanks in advance,
Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090504/f8176528/attachment.htm>


More information about the Insight-users mailing list