Ticket #204: Built_libs_first_in_libpath.diff

File Built_libs_first_in_libpath.diff, 2.5 kB (added by cneumann, 1 year ago)

Patch - put installed lib's path as first element in LIBPATH

  • Source/SConscript

    old new  
    3838                                   osg_lib_suffix=shared_lib_suffix) 
    3939 
    4040   dep_libs = [l for l in config_info.getLibs() if l != full_lib_name] 
    41    lib_env.Append(CPPPATH=config_info.getIncPath(), 
    42                   LIBPATH=[inst_paths["lib_inst_combo"]] + config_info.getLibPath(), 
    43                   LIBS=dep_libs, 
    44                   FRAMEWORKPATH=config_info.getFrameworkPath(), 
    45                   FRAMEWORKS=config_info.getFrameworks()) 
     41   lib_env.Prepend(CPPPATH=config_info.getIncPath(), 
     42                   LIBPATH=[inst_paths["lib_inst_combo"]] + config_info.getLibPath(), 
     43                   LIBS=dep_libs, 
     44                   FRAMEWORKPATH=config_info.getFrameworkPath(), 
     45                   FRAMEWORKS=config_info.getFrameworks()) 
    4646 
    4747   # Define OSG_DEBUG if needed 
    4848   if combo["type"] in ["debug","hybrid"]: 
     
    8989                                       lib_map, 
    9090                                      osg_lib_suffix=shared_lib_suffix)    
    9191      test_env = build_env.Copy() 
    92       test_env.Append(CPPPATH=library.test_cpppath + config_info.getIncPath(), 
    93                       LIBPATH=library.test_libpath + [inst_paths["lib_inst_combo"]] + config_info.getLibPath(), 
    94                       LIBS=config_info.getLibs() + library.other_test_libs, 
    95                       FRAMEWORKPATH=config_info.getFrameworkPath(), 
    96                       FRAMEWORKS=config_info.getFrameworks()) 
     92      test_env.Prepend(CPPPATH=library.test_cpppath + config_info.getIncPath(), 
     93                       LIBPATH=library.test_libpath + [inst_paths["lib_inst_combo"]] + config_info.getLibPath(), 
     94                       LIBS=config_info.getLibs() + library.other_test_libs, 
     95                       FRAMEWORKPATH=config_info.getFrameworkPath(), 
     96                       FRAMEWORKS=config_info.getFrameworks()) 
    9797 
    9898      if GetPlatform() == "win32": 
    9999 
     
    113113      # - Build them all in the unittest directory 
    114114      if build_env["enable_unittests"] and (len(library.unittest_files) > 0):          
    115115         unittest_env = test_env.Copy() 
    116          unittest_env.Append(CPPPATH=unittest_inc, 
    117                              LIBPATH=unittest_libpath, 
    118                              LIBS=unittest_lib) 
     116         unittest_env.Prepend(CPPPATH=unittest_inc, 
     117                              LIBPATH=unittest_libpath, 
     118                              LIBS=unittest_lib) 
    119119 
    120120         if GetPlatform() == "win32": 
    121121