[cgkit-commits] SF.net SVN: cgkit: [161] maya/trunk/plug-ins/sourcepy/SConstruct
Brought to you by:
mbaas
From: <mb...@us...> - 2006-11-23 15:00:25
|
Revision: 161 http://svn.sourceforge.net/cgkit/?rev=161&view=rev Author: mbaas Date: 2006-11-23 07:00:20 -0800 (Thu, 23 Nov 2006) Log Message: ----------- Make the plugin compilable under OSX Modified Paths: -------------- maya/trunk/plug-ins/sourcepy/SConstruct Modified: maya/trunk/plug-ins/sourcepy/SConstruct =================================================================== --- maya/trunk/plug-ins/sourcepy/SConstruct 2006-11-19 22:05:34 UTC (rev 160) +++ maya/trunk/plug-ins/sourcepy/SConstruct 2006-11-23 15:00:20 UTC (rev 161) @@ -15,6 +15,7 @@ opts.Add("CPPPATH", "The include directories", []) opts.Add("LIBPATH", "The library directories", []) opts.Add("LIBS", "The libraries to link with", []) +opts.Add("MAYA_LOCATION", "The location of Maya (OSX only)", os.getenv("MAYA_LOCATION", "")) # Create the construction environment env = Environment(options = opts) @@ -47,6 +48,37 @@ "/export:uninitializePlugin"]) # env.Append(CCFLAGS = ["/GX", "/GR", "/MD", "/W3"]) +elif sys.platform=="darwin": + MAYA_LOCATION = env["MAYA_LOCATION"] + DEVKIT_LOCATION = os.path.join(MAYA_LOCATION, "..", "..", "devkit") + DEVKIT_LOCATION = os.path.normpath(DEVKIT_LOCATION) + DYNLIB_LOCATION = os.path.join(MAYA_LOCATION, "MacOS") + env.Append(CPPPATH = [os.path.join(DEVKIT_LOCATION, "include")]) + env.Append(LIBPATH = [DYNLIB_LOCATION]) + env.Append(CPPDEFINES = ["_BOOL", "MAC_PLUGIN", "OSMac_", "OSMacOSX_", "OSMac_MachO_", "Bits32_", "_LANGUAGE_C_PLUS_PLUS"]) + env.Append(CXXFLAGS = ["-fno-gnu-keywords", "-fpascal-strings"]) + env.Append(LINKFLAGS = ['-Wl,-executable_path,%s'%DYNLIB_LOCATION]) + env.Append(LINKFLAGS = ["-fno-gnu-keywords", "-fpascal-strings"]) + env.Append(LINKFLAGS = ["-arch", "ppc"]) + env.Append(LINKFLAGS = ["-headerpad_max_install_names"]) + env.Append(LINKFLAGS = ["-isysroot", "/Developer/SDKs/MacOSX10.4u.sdk"]) + env.Append(LINKFLAGS = ["-framework","System"]) + env.Append(LINKFLAGS = ["-framework","CoreServices"]) + env.Append(LINKFLAGS = ["-framework","Carbon"]) + env.Append(LINKFLAGS = ["-framework","Cocoa"]) + env.Append(LINKFLAGS = ["-framework","ApplicationServices"]) + env.Append(LINKFLAGS = ["-framework","QuickTime"]) + env.Append(LINKFLAGS = ["-framework","IOKit"]) + env.Append(LINKFLAGS = ["-framework","OpenGL"]) + env.Append(LINKFLAGS = ["-framework","AGL"]) + env.Append(LINKFLAGS = ["-bundle"]) + major,minor,a,b,c = sys.version_info + env.Append(LIBS = ["python%d.%d"%(major,minor)]) + env.Append(LIBS = ["Foundation", "OpenMaya"]) + env.Replace(SHLIBSUFFIX = ".bundle") + # Remove the -dynamiclib flag (as -bundle is used) + env.Replace(SHLINKFLAGS = "$LINKFLAGS") + else: env.Append(CPPDEFINES = ["_BOOL", "LINUX"]) major,minor,a,b,c = sys.version_info This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |