Ticket #29497: patch-SConstruct.diff
File patch-SConstruct.diff, 1.8 KB (added by jason@…, 13 years ago) |
---|
-
SConstruct
old new 123 123 # sources = [s for s in sources if not "/fst" in s] 124 124 125 125 ### SDL (include if it's there in case iulib needs it) 126 127 if conf.Check LibWithHeader('SDL', 'SDL/SDL.h', 'C'):128 if conf.Check LibWithHeader('SDL_gfx', 'SDL/SDL_gfxPrimitives.h', 'C'):126 #Jason C. avoid SDL_main problem 127 if conf.CheckCXXHeader("SDL/SDL.h"): 128 if conf.CheckCXXHeader('SDL/SDL_gfxPrimitives.h'): 129 129 env.Append(LIBS=["SDL","SDL_gfx"]) 130 130 131 131 ### Leptonica … … 175 175 176 176 env.Prepend(CPPPATH=glob("ocr-*")) 177 177 env.Prepend(LIBPATH=['.']) 178 env.Append(SHLINKFLAGS = '-dynamiclib -install_name "@@PREFIX@@/lib/libocropus.dylib"') 178 179 # libocropus = env.StaticLibrary('libocropus.a',sources) 179 180 libocropus = env.SharedLibrary('libocropus',sources) 180 181 # env.Prepend(LIBS=[File("libocropus.so")]) … … 204 205 ################################################################ 205 206 206 207 penv = env.Clone() 207 penv.Append(LIBS=[File("libocropus.so")]) 208 penv.Append(CCFLAGS=["-Xlinker","-rpath=${iulib}/lib"]) 209 penv.Append(LINKFLAGS=["-Xlinker","-rpath=${iulib}/lib"]) 208 penv.Append(LIBS=[File(libocropus)]) 210 209 211 210 for cmd in glob("commands/*.cc"): 212 penv.Program(cmd,LIBS=File( "libocropus.so"))211 penv.Program(cmd,LIBS=File(libocropus)) 213 212 penv.Install(destdir+bindir,re.sub('.cc$','',cmd)) 214 213 215 214 ################################################################ … … 221 220 test_builder = Builder(action='$SOURCE && touch $TARGET', 222 221 suffix = '.passed', 223 222 src_suffix = '') 224 env.Append(BUILDERS={'Test':test_builder})223 penv.Append(BUILDERS={'Test':test_builder}) 225 224 for cmd in Glob("*/test-*.cc")+Glob("*/test*/test-*.cc"): 226 225 cmd = str(cmd) 227 226 penv.Program(cmd)