From 8fb067af93cfd2c64968e1919d75a323c8e01531 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 12 Apr 2012 02:37:28 +0000 Subject: code cleanup: avoid confusion with utfconv lib - was configuring this windows only lib on non windows platforms (scons only). --- intern/SConscript | 10 ++++++---- intern/utfconv/CMakeLists.txt | 5 +++-- intern/utfconv/SConscript | 11 +++++++---- intern/utfconv/utf_winfunc.c | 6 +----- intern/utfconv/utf_winfunc.h | 9 ++++----- intern/utfconv/utfconv.c | 2 +- intern/utfconv/utfconv.h | 2 +- 7 files changed, 23 insertions(+), 22 deletions(-) (limited to 'intern') diff --git a/intern/SConscript b/intern/SConscript index 71821bd9e99..d7c3715349b 100644 --- a/intern/SConscript +++ b/intern/SConscript @@ -3,7 +3,6 @@ Import ('env') SConscript(['audaspace/SConscript', 'string/SConscript', - 'utfconv/SConscript', # XXX - why use this on UNIX? 'ghost/SConscript', 'guardedalloc/SConscript', 'moto/SConscript', @@ -21,10 +20,10 @@ SConscript(['audaspace/SConscript', # 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_FLUID']: 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']) diff --git a/intern/utfconv/CMakeLists.txt b/intern/utfconv/CMakeLists.txt index 74b91fd0f2b..8da03427c37 100644 --- a/intern/utfconv/CMakeLists.txt +++ b/intern/utfconv/CMakeLists.txt @@ -28,10 +28,11 @@ set(SRC 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 diff --git a/intern/utfconv/SConscript b/intern/utfconv/SConscript index 1f0fab330d3..010fcf9aa7c 100644 --- a/intern/utfconv/SConscript +++ b/intern/utfconv/SConscript @@ -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'): - env.BlenderLib ('bf_utfconv', sources, Split(incs), Split(defs), libtype=['intern','player'], priority=[0,0] ) + sources += ['utf_winfunc.c'] + +env.BlenderLib('bf_utfconv', sources, Split(incs), Split(defs), libtype=['intern','player'], priority=[0,0]) diff --git a/intern/utfconv/utf_winfunc.c b/intern/utfconv/utf_winfunc.c index f48a9c2afaa..2e200ea3ad3 100644 --- a/intern/utfconv/utf_winfunc.c +++ b/intern/utfconv/utf_winfunc.c @@ -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 @@ int uputenv(const char *name, const char *value) return r; } - -#endif /* WIN32 */ diff --git a/intern/utfconv/utf_winfunc.h b/intern/utfconv/utf_winfunc.h index a189fc52742..e92e7953cfc 100644 --- a/intern/utfconv/utf_winfunc.h +++ b/intern/utfconv/utf_winfunc.h @@ -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,9 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifdef WIN32 - +#ifndef WIN32 +# error "This file can only compile on windows" +#endif #include "utfconv.h" #include @@ -40,5 +41,3 @@ int uput_getenv(const char *varname, char * value, size_t buffsize); int uputenv(const char *name, const char *value); int umkdir(const char *pathname); - -#endif diff --git a/intern/utfconv/utfconv.c b/intern/utfconv/utfconv.c index c5181226f6e..99f5fcb4c2c 100644 --- a/intern/utfconv/utfconv.c +++ b/intern/utfconv/utfconv.c @@ -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 diff --git a/intern/utfconv/utfconv.h b/intern/utfconv/utfconv.h index f5ab32cce3e..3bfd2772991 100644 --- a/intern/utfconv/utfconv.h +++ b/intern/utfconv/utfconv.h @@ -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 -- cgit v1.2.3