Changeset 76

Show
Ignore:
Timestamp:
09/08/06 14:24:43 (2 years ago)
Author:
allenb
Message:

Try to make this more compatible with the old version.

- Ignore opt and dbg args
- Allow special case names that don't actually name the library, but just the abreviated name: (ex: GLUT vs OSGWindowGLUT)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/osg-config.in

    r73 r76  
    7171   parser.add_option("--libpath-prefix",default=def_libpathprefix,  
    7272                     help="Linker library path prefix to use. (%s)"%def_libpathprefix) 
     73   parser.add_option("--opt",action="store_true",help="Ignored for backwards compatibility.") 
     74   parser.add_option("--dbg",action="store_true",help="Ignored for backwards compatibility.") 
    7375 
    7476   (options, pos_args) = parser.parse_args()   
     
    8385    
    8486   # Try to find libname 
    85    # - Try given name and name with OSG prefix 
     87   # - Try given name and name with OSG or OSGWindow prefix 
    8688   libraries = [] 
    8789   if len(pos_args):       
    8890      for n in pos_args: 
    89          if lib_map.has_key(n): 
    90             libraries.append(lib_map[n]) 
    91          elif lib_map.has_key("OSG%s"%n): 
    92             libraries.append(lib_map["OSG%s"%n]) 
    93          else: 
    94             print "Error: Can not find library named: ", n 
     91         for name_alt in [n, "OSG"+n, "OSGWindow"+n, None]: 
     92            if not name_alt: 
     93               print "Error: Can not find library named: ", n             
     94            elif lib_map.has_key(name_alt): 
     95               libraries.append(lib_map[name_alt]) 
     96               break 
     97 
    9598       
    9699   # Make sure we have libraries