[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45553] trunk/blender/intern: code cleanup : avoid confusion with utfconv lib - was configuring this windows only lib on non windows platforms (scons only).

Campbell Barton ideasman42 at gmail.com
Thu Apr 12 04:37:31 CEST 2012


Revision: 45553
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45553
Author:   campbellbarton
Date:     2012-04-12 02:37:28 +0000 (Thu, 12 Apr 2012)
Log Message:
-----------
code cleanup: avoid confusion with utfconv lib - was configuring this windows only lib on non windows platforms (scons only).

Modified Paths:
--------------
    trunk/blender/intern/SConscript
    trunk/blender/intern/utfconv/CMakeLists.txt
    trunk/blender/intern/utfconv/SConscript
    trunk/blender/intern/utfconv/utf_winfunc.c
    trunk/blender/intern/utfconv/utf_winfunc.h
    trunk/blender/intern/utfconv/utfconv.c
    trunk/blender/intern/utfconv/utfconv.h

Modified: trunk/blender/intern/SConscript
===================================================================
--- trunk/blender/intern/SConscript	2012-04-12 02:15:33 UTC (rev 45552)
+++ trunk/blender/intern/SConscript	2012-04-12 02:37:28 UTC (rev 45553)
@@ -3,7 +3,6 @@
 
 SConscript(['audaspace/SConscript',
             'string/SConscript',
-            'utfconv/SConscript',  # XXX - why use this on UNIX?
             'ghost/SConscript',
             'guardedalloc/SConscript',
             'moto/SConscript',
@@ -21,10 +20,10 @@
 # getting it to compile is difficult
 # intern/bsp has been used anyway, so
 # perhaps get rid of intern/csg?
-NEW_CSG='false'
+NEW_CSG = 'false'
 
 if env ['WITH_BF_REMESH']:
-	SConscript(['dualcon/SConscript'])
+    SConscript(['dualcon/SConscript'])
 
 if env['WITH_BF_FLUID']:
     SConscript(['elbeem/SConscript'])
@@ -32,7 +31,10 @@
 if env['WITH_BF_CYCLES']:
     SConscript(['cycles/SConscript'])
 
-if NEW_CSG=='false':
+if NEW_CSG == 'false':
     SConscript(['bsp/SConscript'])
 else:
     SConscript(['csg/SConscript'])
+
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+    SConscript(['utfconv/SConscript'])

Modified: trunk/blender/intern/utfconv/CMakeLists.txt
===================================================================
--- trunk/blender/intern/utfconv/CMakeLists.txt	2012-04-12 02:15:33 UTC (rev 45552)
+++ trunk/blender/intern/utfconv/CMakeLists.txt	2012-04-12 02:37:28 UTC (rev 45553)
@@ -28,10 +28,11 @@
 	utfconv.c
 
 	utfconv.h
-	#utf_func.h
 )
 
-
+# This is odd but leave it for now...
+# Why have win32 check here? - this is only used for windows.
+# ... because one day we might want to use it on other platforms.
 if(WIN32)
 	list(APPEND SRC
 		utf_winfunc.c

Modified: trunk/blender/intern/utfconv/SConscript
===================================================================
--- trunk/blender/intern/utfconv/SConscript	2012-04-12 02:15:33 UTC (rev 45552)
+++ trunk/blender/intern/utfconv/SConscript	2012-04-12 02:37:28 UTC (rev 45553)
@@ -1,12 +1,15 @@
 #!/usr/bin/python
 Import ('env')
 
-sources = env.Glob('*.c')
+sources = ['utfconv.c']
 
 incs = '.'
 defs = ''
 
+# This is odd but leave it for now...
+# Why have win32 check here? - this is only used for windows.
+# ... because one day we might want to use it on other platforms.
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+	sources += ['utf_winfunc.c']
 
-
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
-    env.BlenderLib ('bf_utfconv', sources, Split(incs), Split(defs), libtype=['intern','player'], priority=[0,0] )
+env.BlenderLib('bf_utfconv', sources, Split(incs), Split(defs), libtype=['intern','player'], priority=[0,0])

Modified: trunk/blender/intern/utfconv/utf_winfunc.c
===================================================================
--- trunk/blender/intern/utfconv/utf_winfunc.c	2012-04-12 02:15:33 UTC (rev 45552)
+++ trunk/blender/intern/utfconv/utf_winfunc.c	2012-04-12 02:37:28 UTC (rev 45553)
@@ -15,7 +15,7 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
  * All rights reserved.
  *
  * Contributor(s): Alexandr Kuznetsov, Andrea Weikert
@@ -23,8 +23,6 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef WIN32
-
 #ifndef _WIN32_IE
 #define _WIN32_IE 0x0501
 #endif
@@ -153,5 +151,3 @@
 
 	return r;
 }
-
-#endif /* WIN32 */

Modified: trunk/blender/intern/utfconv/utf_winfunc.h
===================================================================
--- trunk/blender/intern/utfconv/utf_winfunc.h	2012-04-12 02:15:33 UTC (rev 45552)
+++ trunk/blender/intern/utfconv/utf_winfunc.h	2012-04-12 02:37:28 UTC (rev 45553)
@@ -15,7 +15,7 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
  * All rights reserved.
  * 
  * Contributor(s): Alexandr Kuznetsov, Andrea Weikert
@@ -23,9 +23,10 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef WIN32
+#ifndef WIN32
+#  error "This file can only compile on windows"
+#endif
 
-
 #include "utfconv.h"
 #include <stdio.h>
 
@@ -40,5 +41,3 @@
 int uputenv(const char *name, const char *value);
 
 int umkdir(const char *pathname);
-
-#endif

Modified: trunk/blender/intern/utfconv/utfconv.c
===================================================================
--- trunk/blender/intern/utfconv/utfconv.c	2012-04-12 02:15:33 UTC (rev 45552)
+++ trunk/blender/intern/utfconv/utfconv.c	2012-04-12 02:37:28 UTC (rev 45553)
@@ -15,7 +15,7 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
  * All rights reserved.
  * 
  * Contributor(s): Alexandr Kuznetsov, Andrea Weikert

Modified: trunk/blender/intern/utfconv/utfconv.h
===================================================================
--- trunk/blender/intern/utfconv/utfconv.h	2012-04-12 02:15:33 UTC (rev 45552)
+++ trunk/blender/intern/utfconv/utfconv.h	2012-04-12 02:37:28 UTC (rev 45553)
@@ -15,7 +15,7 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
  * All rights reserved.
  * 
  * Contributor(s): Alexandr Kuznetsov, Andrea Weikert




More information about the Bf-blender-cvs mailing list