X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5be89298950b18224d694f8a64b3768640490bae..5bb82ad49f605933e95f8ca77714cf7f69e5f9af:/build/tools/build-wxwidgets.py?ds=sidebyside diff --git a/build/tools/build-wxwidgets.py b/build/tools/build-wxwidgets.py index 9764ad50c3..a3d370d20a 100755 --- a/build/tools/build-wxwidgets.py +++ b/build/tools/build-wxwidgets.py @@ -174,6 +174,7 @@ def main(scriptName, args): "mac_framework" : (False, "Install the Mac build as a framework"), "mac_framework_prefix" : (defFwPrefix, "Prefix where the framework should be installed. Default: %s" % defFwPrefix), + "cairo" : (False, "Enable dynamicly loading the Cairo lib for wxGraphicsContext on MSW"), "no_config" : (False, "Turn off configure step on autoconf builds"), "config_only" : (False, "Only run the configure step and then exit"), "rebake" : (False, "Regenerate Bakefile and autoconf files"), @@ -182,7 +183,6 @@ def main(scriptName, args): "cocoa" : (False, "Build the old Mac Cooca port."), "osx_cocoa" : (False, "Build the new Cocoa port"), "shared" : (False, "Build wx as a dynamic library"), - "cairo" : (False, "Build support for wxCairoContext (always true on GTK+)"), "extra_make" : ("", "Extra args to pass on [n]make's command line."), "features" : ("", "A comma-separated list of wxUSE_XYZ defines on Win, or a list of configure flags on unix."), "verbose" : (False, "Print commands as they are run, (to aid with debugging this script)"), @@ -343,6 +343,8 @@ def main(scriptName, args): flags["wxUSE_UNICODE_MSLU"] = "1" if options.cairo: + if not os.environ.get("CAIRO_ROOT"): + print "WARNING: Expected CAIRO_ROOT set in the environment!" flags["wxUSE_CAIRO"] = "1" if options.wxpython: @@ -361,7 +363,7 @@ def main(scriptName, args): if VERSION >= (2,9): flags["wxUSE_UIACTIONSIMULATOR"] = "1" - + mswIncludeDir = os.path.join(wxRootDir, "include", "wx", "msw") setup0File = os.path.join(mswIncludeDir, "setup0.h") @@ -396,6 +398,14 @@ def main(scriptName, args): args.append("BUILD=release") else: args.append("BUILD=debug") + + if options.shared: + args.append("SHARED=1") + + if options.cairo: + args.append( + "CPPFLAGS=/I%s" % + os.path.join(os.environ.get("CAIRO_ROOT", ""), 'include\\cairo')) wxBuilder = builder.MSVCBuilder() @@ -416,11 +426,7 @@ def main(scriptName, args): if options.clean: print "Performing cleanup." - wxBuilder.clean() - - if options.wxpython: - exitIfError(wxBuilder.clean(os.path.join(contribDir, "gizmos")), "Error building gizmos") - exitIfError(wxBuilder.clean(os.path.join(contribDir, "stc")), "Error building stc") + wxBuilder.clean(dir=buildDir, options=args) sys.exit(0) @@ -430,21 +436,12 @@ def main(scriptName, args): if not sys.platform.startswith("win"): args.append("--jobs=" + options.jobs) exitIfError(wxBuilder.build(dir=buildDir, options=args), "Error building") - - if options.wxpython and os.path.exists(contribDir): - exitIfError(wxBuilder.build(os.path.join(contribDir, "gizmos"), options=args), "Error building gizmos") - exitIfError(wxBuilder.build(os.path.join(contribDir, "stc"),options=args), "Error building stc") if options.install: extra=None if installDir: extra = ['DESTDIR='+installDir] - wxBuilder.install(dir=buildDir, options=extra) - - if options.wxpython and os.path.exists(contribDir): - exitIfError(wxBuilder.install(os.path.join(contribDir, "gizmos"), options=extra), "Error building gizmos") - exitIfError(wxBuilder.install(os.path.join(contribDir, "stc"), options=extra), "Error building stc") - + wxBuilder.install(dir=buildDir, options=extra) if options.install and options.mac_framework: