Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / tools / Blender.py
index d7cbe10..7979003 100644 (file)
@@ -101,10 +101,7 @@ def create_blender_liblist(lenv = None, libtype = None):
                sortlist.sort()
                for sk in sortlist:
                        v = curlib[sk]
-                       if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
-                               target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
-                       else:
-                               target = os.path.abspath(root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
+                       target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
                        lst.append(target)
 
        return lst
@@ -115,7 +112,6 @@ def setup_staticlibs(lenv):
                #here libs for static linking
        ]
        libincs = [
-               '/usr/lib',
                lenv['BF_OPENGL_LIBPATH'],
                lenv['BF_JPEG_LIBPATH'],
                lenv['BF_PNG_LIBPATH'],
@@ -124,6 +120,9 @@ def setup_staticlibs(lenv):
                lenv['BF_ICONV_LIBPATH']
                ]
 
+       if lenv['OURPLATFORM'] != 'linuxcross':
+               libincs = ['/usr/lib'] + libincs
+
        libincs += Split(lenv['BF_FREETYPE_LIBPATH'])
        if lenv['WITH_BF_PYTHON']:
                libincs += Split(lenv['BF_PYTHON_LIBPATH'])
@@ -133,8 +132,6 @@ def setup_staticlibs(lenv):
                libincs += Split(lenv['BF_FFMPEG_LIBPATH'])
        if lenv['WITH_BF_JACK']:
                libincs += Split(lenv['BF_JACK_LIBPATH'])
-       if lenv['WITH_BF_SNDFILE']:
-               libincs += Split(lenv['BF_SNDFILE_LIBPATH'])
        if lenv['WITH_BF_OPENEXR']:
                libincs += Split(lenv['BF_OPENEXR_LIBPATH'])
                if lenv['WITH_BF_STATICOPENEXR']:
@@ -170,6 +167,8 @@ def setup_syslibs(lenv):
                ]
 
        syslibs += Split(lenv['BF_FREETYPE_LIB'])
+       if lenv['WITH_BF_UNIT_TEST']:
+               syslibs.append(lenv['BF_CHECK_LIB'])
        if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']:
                if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
                        syslibs.append(lenv['BF_PYTHON_LIB']+'_d')
@@ -196,8 +195,6 @@ def setup_syslibs(lenv):
                        syslibs += Split(lenv['BF_OGG_LIB'])
        if lenv['WITH_BF_JACK']:
                        syslibs += Split(lenv['BF_JACK_LIB'])
-       if lenv['WITH_BF_SNDFILE']:
-                       syslibs += Split(lenv['BF_SNDFILE_LIB'])
        if lenv['WITH_BF_FFTW3']:
                syslibs += Split(lenv['BF_FFTW3_LIB'])
        if lenv['WITH_BF_SDL']:
@@ -240,7 +237,7 @@ def buildinfo(lenv, build_type):
 
        obj = []
        if lenv['BF_BUILDINFO']:
-               if sys.platform=='win32':
+               if sys.platform=='win32' or lenv['OURPLATFORM']=='linuxcross':
                        build_info_file = open("source/creator/winbuildinfo.h", 'w')
                        build_info_file.write("char *build_date=\"%s\";\n"%build_date)
                        build_info_file.write("char *build_time=\"%s\";\n"%build_time)
@@ -468,11 +465,7 @@ class BlenderEnvironment(SConsEnvironment):
                
                print bc.HEADER+'Configuring resource '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC
                lenv = self.Clone()
-               if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
-                       res = lenv.RES('#'+root_build_dir+'lib/'+libname, source)
-               else:
-                       res = lenv.RES(root_build_dir+'lib/'+libname, source)
-
+               res = lenv.RES('#'+root_build_dir+'lib/'+libname, source)
                
                SConsEnvironment.Default(self, res)
                resources.append(res)