[wx] Build fix, do not build WebCore as a convenience library as this leads to
[WebKit.git] / WebKit / wx / bindings / python / wscript
index f9d73c3366cd9cbf16a7861dba06eac111b2a924..cd078363e39f9ec11e8fdc427294af3af282caea 100644 (file)
@@ -30,6 +30,9 @@ import Logs
 import Options
 
 include_paths = [
+            os.path.join(wk_root, 'JavaScriptCore'),
+            os.path.join(wk_root, 'WebCore', 'bindings', 'cpp'),
+            os.path.join(wk_root, 'WebCore', 'DerivedSources'),
             os.path.join(wk_root, 'WebKit', 'wx'),
             os.path.join(wx_root, 'wxPython', 'include'),
             os.path.join(wx_root, '..', 'wxPython', 'include'),
@@ -50,18 +53,14 @@ def wxpy_swig_include():
             return fullpath
             
     return ''
-
-def set_options(opt):
-    common_set_options(opt)
-
-def configure(conf):
-    common_configure(conf)
-    conf.check_tool('swig', tooldir='.')
-    conf.check_swig_version('1.3.29')
     
 def build(bld):
     if Options.options.wxpython:
-        wx_swig_args = ['-DSWIG_TYPE_TABLE=_wxPython_table', '-DWXP_USE_THREAD=1', '-DSWIG_PYTHON_OUTPUT_TUPLE']
+        defines = ['SWIG_TYPE_TABLE=_wxPython_table', 'WXP_USE_THREAD=1', 'SWIG_PYTHON_OUTPUT_TUPLE']
+        wx_swig_args = []
+        for define in defines:
+            wx_swig_args.append('-D%s' % define)
+
         try:
             import wx.build.config
             wx_swig_args += wx.build.config.swig_args
@@ -76,14 +75,19 @@ def build(bld):
             Logs.warn("Cannot find location of wxPython .i files, wxPython extension will not be built.")
             return
     
+        for inc_path in include_paths:
+            wx_swig_args.append('-I' + inc_path)
+
         obj = bld.new_task_gen(
             features = 'cxx cshlib pyext',
             includes = ' '.join(include_paths),
             source = 'webview.i',
             swig_flags = ' '.join(wx_swig_args),
+            defines = defines,
             target = '_webview',
-            uselib = 'WX CURL ICU XSLT XML SQLITE3 WXWEBKIT ' + waf_configname,
+            uselib = 'WX CURL ICU XSLT XML SQLITE3 ' + get_config(),
             
             libpath = [output_dir],
-            uselib_local = '',
-            install_path = output_dir)
+            uselib_local = 'wxwebkit',
+            install_path = output_dir
+            )