Changeset 52

Show
Ignore:
Timestamp:
09/05/06 17:06:25 (2 years ago)
Author:
allenb
Message:

- Fix build issues on windows

  • Only setup builds for tests if the osg libs they use are available
  • Fix linkage problem in material drawable
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/scons_build_creation/SConstruct

    r45 r52  
    9696# Create option objects 
    9797boost_options = sca_opts.Boost.Boost("boost","1.31.0",required=True) 
     98 
     99glut_libname = "glut" 
     100tiff_libname = "tiff" 
     101if "win32" == platform: 
     102   glut_libname = "glut32" 
     103   tiff_libname = "tif32" 
     104    
    98105jpeg_option = sca_opts.StandardPackageOption("jpeg","Jpeg library location", 
    99106                                             library="jpeg", required=False) 
    100107tiff_option = sca_opts.StandardPackageOption("tiff","Tiff library location", 
    101                                              library="tiff", required=False) 
     108                                             library=tiff_libname, required=False) 
    102109png_option = sca_opts.StandardPackageOption("png","PNG library location", 
    103110                                             library="png", required=False) 
    104  
    105111glut_option = sca_opts.StandardPackageOption("glut","GLUT library location", 
    106                                              library="glut", header="GL/glut.h", required=False) 
     112                                             library=glut_libname, header="GL/glut.h", required=False) 
    107113 
    108114format_options = [jpeg_option,tiff_option,png_option] 
  • branches/scons_build_creation/Source/Base/build.info

    r35 r52  
    77   osg_dep_libs = [] 
    88   if "win32" == platform: 
    9       libs = ['opengl32'
     9      libs = ['opengl32',"glu32","winmm", "wsock32"
    1010      cpppath = [] 
    1111   else: 
  • branches/scons_build_creation/Source/SConscript

    r36 r52  
    1010 
    1111for (lib_name, library) in lib_map.iteritems(): 
     12   print "Library: ", lib_name, "  tests:", library.test_files 
     13    
     14   # ---- Setup and Build library --- # 
    1215   lib_env = common_lib_env.Copy() 
    1316 
    14    print "Library: ", lib_name, "  tests:", library.test_files 
    1517   # XXX: Apply custom options 
    1618   # TODO: OSG_COMPILEBASELIB 
     
    2729   #   lib_env.Install(inst_paths['lib'], static_lib) 
    2830    
    29    # Build tests 
    30    # - Put them all in the local 'test' subdir 
    31    default_lib_settings = LibraryInfo() 
    32    default_lib_settings.libpath.insert(0, inst_paths["lib"])  
    33    default_lib_settings.cpppath.insert(0, inst_paths["include"]) 
    34     
    35    config_info = ConfigInfoAdapter(library.osg_test_libs, lib_map, default_lib_settings) 
    36     
    37    test_env = build_env.Copy() 
    38    test_env.Append(CPPPATH=library.test_cpppath + config_info.getIncPath(), 
    39                    LIBPATH=library.test_libpath + config_info.getLibPath(), 
    40                    LIBS=[lib_name] + config_info.getLibs() + library.other_test_libs) 
    41    for s in library.test_files: 
    42       test_env.Program(target= pj("..","test",os.path.splitext(os.path.basename(s))[0]), 
    43                        source=s) 
    44  
    45    # Handle headers 
     31   # Install headers (but only do it once during variant_pass 0 ) 
    4632   if variant_pass == 0:       
    4733      lib_env.Install(inst_paths["include"], library.header_files) 
     34    
     35   # ---- Build Tests ---- #    
     36   # Verify we have all the deps for the tests 
     37   #   todo: How do we verify the "other test libs" 
     38   have_test_deps = True 
     39   for n in library.osg_test_libs: 
     40      if not lib_map.has_key(n): 
     41         have_test_deps = False 
     42         print "   missing test dep library:", n 
     43    
     44   if have_test_deps: 
     45      # default settings to pass to config info    
     46      default_lib_settings = LibraryInfo() 
     47      default_lib_settings.libpath.insert(0, inst_paths["lib"])  
     48      default_lib_settings.cpppath.insert(0, inst_paths["include"]) 
     49      config_info = ConfigInfoAdapter(library.osg_test_libs, lib_map, default_lib_settings) 
     50    
     51      test_env = build_env.Copy() 
     52      test_env.Append(CPPPATH=library.test_cpppath + config_info.getIncPath(), 
     53                      LIBPATH=library.test_libpath + config_info.getLibPath(), 
     54                      LIBS=[lib_name] + config_info.getLibs() + library.other_test_libs) 
     55    
     56      # - Build them all in the local 'test' subdir 
     57      for s in library.test_files: 
     58         test_env.Program(target= pj("..","test",os.path.splitext(os.path.basename(s))[0]), 
     59                          source=s) 
     60    
     61   # Done    
  • branches/scons_build_creation/Source/System/NodeCores/Drawables/Base/OSGMaterialDrawable.h

    r2 r52  
    5656 */ 
    5757 
    58 class OSG_SYSTEM_DLLMAPPING MaterialDrawable : public MaterialDrawableBase 
     58class OSG_DRAWABLE_DLLMAPPING MaterialDrawable : public MaterialDrawableBase 
    5959{ 
    6060  private: