+#----------------------------------------------------------------------
+# Define the GIZMOS extension module
+#----------------------------------------------------------------------
+
+if BUILD_GIZMOS:
+ msg('Preparing GIZMOS...')
+ location = 'contrib/gizmos'
+ GIZMOLOC = opj(location, 'contrib/src/gizmos')
+ GIZMOINC = opj(location, 'contrib/include')
+
+ swig_files = ['gizmos.i']
+
+ swig_sources = run_swig(swig_files, location, '', PKGDIR,
+ USE_SWIG, swig_force, swig_args, swig_deps)
+
+ gizmos_includes = includes[:]
+ gizmos_includes.append(GIZMOINC)
+
+
+ # make sure local copy of contrib files are up to date
+ if IN_CVS_TREE:
+ contrib_copy_tree(opj(CTRB_INC, 'gizmos'), opj(GIZMOINC, 'wx/gizmos'))
+ contrib_copy_tree(opj(CTRB_SRC, 'gizmos'), GIZMOLOC)
+
+ ext = Extension('gizmosc', [
+ '%s/dynamicsash.cpp' % GIZMOLOC,
+ '%s/editlbox.cpp' % GIZMOLOC,
+ '%s/splittree.cpp' % GIZMOLOC,
+ '%s/ledctrl.cpp' % GIZMOLOC,
+ #'%s/multicell.cpp' % GIZMOLOC,
+
+ '%s/treelistctrl.cpp' % location,
+
+ ] + swig_sources,
+
+ include_dirs = gizmos_includes,
+ define_macros = defines,
+
+ library_dirs = libdirs,
+ libraries = libs,
+
+ extra_compile_args = cflags,
+ extra_link_args = lflags,
+ )
+
+ wxpExtensions.append(ext)
+
+
+
+#----------------------------------------------------------------------
+# Define the DLLWIDGET extension module
+#----------------------------------------------------------------------
+
+if BUILD_DLLWIDGET:
+ msg('Preparing DLLWIDGET...')
+ location = 'contrib/dllwidget'
+ swig_files = ['dllwidget_.i']
+
+ swig_sources = run_swig(swig_files, location, '', PKGDIR,
+ USE_SWIG, swig_force, swig_args, swig_deps)
+
+ # copy a contrib project specific py module to the main package dir
+ copy_file(opj(location, 'dllwidget.py'), PKGDIR, update=1, verbose=0)
+
+ ext = Extension('dllwidget_c', [
+ '%s/dllwidget.cpp' % location,
+ ] + swig_sources,
+
+ include_dirs = includes,
+ define_macros = defines,
+
+ library_dirs = libdirs,
+ libraries = libs,
+
+ extra_compile_args = cflags,
+ extra_link_args = lflags,
+ )
+
+ wxpExtensions.append(ext)
+
+
+#----------------------------------------------------------------------
+# Define the CANVAS extension module
+#----------------------------------------------------------------------
+
+if BUILD_CANVAS:
+ msg('Preparing CANVAS...')
+ location = 'contrib/canvas'
+ CANVASLOC = opj(location, 'contrib/src/canvas')
+ CANVASINC = opj(location, 'contrib/include')
+
+ swig_files = ['canvas.i']
+
+ swig_sources = run_swig(swig_files, location, '', PKGDIR,
+ USE_SWIG, swig_force, swig_args, swig_deps)
+
+ if IN_CVS_TREE:
+ # make sure local copy of contrib files are up to date
+ contrib_copy_tree(opj(CTRB_INC, 'canvas'), opj(CANVASINC, 'wx/canvas'))
+ contrib_copy_tree(opj(CTRB_SRC, 'canvas'), CANVASLOC)
+
+ ext = Extension('canvasc', ['%s/bbox.cpp' % CANVASLOC,
+ '%s/liner.cpp' % CANVASLOC,
+ '%s/polygon.cpp' % CANVASLOC,
+ '%s/canvas.cpp' % CANVASLOC,
+ ] + swig_sources,
+
+ include_dirs = [CANVASINC] + includes,
+ define_macros = defines,
+
+ library_dirs = libdirs,
+ libraries = libs,
+
+ extra_compile_args = cflags,
+ extra_link_args = lflags,
+ )
+
+ wxpExtensions.append(ext)
+
+
+#----------------------------------------------------------------------
+# Define the ART2D extension module
+#----------------------------------------------------------------------
+
+if BUILD_ART2D:
+ msg('Preparing ART2D...')
+ location = 'contrib/art2d'
+ ART2DLOC = opj(location, 'modules/canvas/src')
+ ART2DINC = opj(location, 'modules/canvas/include')
+ EXPATLOC = opj(location, 'modules/expat')
+ EXPATINC = opj(location, 'modules/expat/include')
+
+ swig_files = ['art2d.i',
+ 'art2d_misc.i',
+ 'art2d_base.i',
+ 'art2d_canvas.i',
+ ]
+
+ swig_sources = run_swig(swig_files, location, '', PKGDIR,
+ USE_SWIG, swig_force, swig_args, swig_deps)
+
+ if IN_CVS_TREE:
+ # Don't copy data in this case as the code snapshots are
+ # taken manually
+ pass
+
+ ext = Extension('art2dc', [ opj(ART2DLOC, 'afmatrix.cpp'),
+ opj(ART2DLOC, 'bbox.cpp'),
+ opj(ART2DLOC, 'cancom.cpp'),
+ opj(ART2DLOC, 'candoc.cpp'),
+ opj(ART2DLOC, 'canglob.cpp'),
+ opj(ART2DLOC, 'canobj3d.cpp'),
+ opj(ART2DLOC, 'canobj.cpp'),
+ opj(ART2DLOC, 'canprim.cpp'),
+ opj(ART2DLOC, 'canprop.cpp'),
+ opj(ART2DLOC, 'canvas.cpp'),
+ opj(ART2DLOC, 'docviewref.cpp'),
+ opj(ART2DLOC, 'drawer.cpp'),
+ opj(ART2DLOC, 'eval.cpp'),
+ opj(ART2DLOC, 'graph.cpp'),
+ opj(ART2DLOC, 'layerinf.cpp'),
+ opj(ART2DLOC, 'liner.cpp'),
+ opj(ART2DLOC, 'meta.cpp'),
+ opj(ART2DLOC, 'objlist.cpp'),
+ opj(ART2DLOC, 'polygon.cpp'),
+ opj(ART2DLOC, 'recur.cpp'),
+ opj(ART2DLOC, 'rendimg.cpp'),
+ opj(ART2DLOC, 'tools.cpp'),
+ opj(ART2DLOC, 'vpath.cpp'),
+ opj(ART2DLOC, 'xmlpars.cpp'),
+
+ opj(EXPATLOC, 'xmlparse/xmlparse.c'),
+ opj(EXPATLOC, 'xmltok/xmlrole.c'),
+ opj(EXPATLOC, 'xmltok/xmltok.c'),
+
+ ] + swig_sources,
+
+ include_dirs = [ ART2DINC,
+ EXPATINC,
+ opj(EXPATLOC, 'xmltok'),
+ opj(EXPATLOC, 'xmlparse'),
+ ] + includes,
+ define_macros = defines,
+
+ library_dirs = libdirs,
+ libraries = libs,
+
+ extra_compile_args = cflags,
+ extra_link_args = lflags,
+ )
+
+ wxpExtensions.append(ext)
+
+
+#----------------------------------------------------------------------
+# Tools and scripts
+#----------------------------------------------------------------------
+
+if NO_SCRIPTS:
+ SCRIPTS = None
+else:
+ SCRIPTS = [opj('scripts/helpviewer'),
+ opj('scripts/img2png'),
+ opj('scripts/img2xpm'),
+ opj('scripts/img2py'),
+ opj('scripts/xrced'),
+ opj('scripts/pyshell'),
+ opj('scripts/pycrust'),
+ opj('scripts/pywrap'),
+ opj('scripts/pywrap'),
+ opj('scripts/pyalacarte'),
+ opj('scripts/pyalamode'),
+ ]
+
+
+DATA_FILES += find_data_files('wxPython/tools/XRCed', '*.txt', '*.xrc')
+DATA_FILES += find_data_files('wxPython/py', '*.txt', '*.ico', '*.css', '*.html')
+DATA_FILES += find_data_files('wx', '*.txt', '*.css', '*.html')
+