Ticket #29491: patch-SConstruct.diff

File patch-SConstruct.diff, 1.3 KB (added by jason@…, 14 years ago)

updated SConstruct that allows tests to run in the work tree

  • SConstruct

    old new  
    4848# opts.Add(BoolVariable('style', 'Check style', "no"))
    4949
    5050env = Environment(options=opts, CXXFLAGS=["${opt}","${warn}"])
     51env.Append( CPPPATH=["@@PREFIX@@/include"] )
     52env.Append( LIBPATH=["@@PREFIX@@/lib/"] )
     53env["CFLAGS"] = os.getenv("CFLAGS")
     54env["CXXFLAGS"] = os.getenv("CXXFLAGS")
     55env["LINKFLAGS"] = os.getenv("LINKFLAGS")
     56
    5157Help(opts.GenerateHelpText(env))
    5258
    5359conf = Configure(env)
     
    117123else:
    118124    sources += ["utils/dgraphics_nosdl.cc"]
    119125
     126env.Append(SHLINKFLAGS = '-dynamiclib -install_name "@@PREFIX@@/lib/libiulib.dylib"')
    120127libiulib = env.SharedLibrary('libiulib',sources)
    121128
    122129env.Append(CXXFLAGS=['-g','-fPIC'])
     
    145152progs.Append(BUILDERS={'Test':test_builder})
    146153
    147154if env["test"]:
     155    progs.Prepend(ENV = {'DYLD_LIBRARY_PATH': '.'})
    148156    for file in glob.glob("*/test-*.cc") + glob.glob("*/*/test-*.cc"):
    149         if not file.startswith('vidio'):
     157        #Jason C - I exclude test-pbmpng becuase it depends on convert from ImageMagick
     158        if not (file.startswith('vidio') or file.startswith('imgio/tests/test-pbmpng')):
    150159            progs.Program(file[:-3],file)
    151160            progs.Test(file[:-3])
    152161            progs.Alias("test",file[:-3]+".passed")