'scons blenderlite' failed because blf expected freetype
authorCampbell Barton <ideasman42@gmail.com>
Thu, 29 Jan 2009 21:41:43 +0000 (21:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 29 Jan 2009 21:41:43 +0000 (21:41 +0000)
source/blender/blenfont/CMakeLists.txt
source/blender/blenfont/SConscript
source/blender/blenfont/intern/blf_lang.c

index c74b0a533f09ed92c573fa8a1e0b0d3dc8eb7bdc..cd91bf69c91bb82607bf4dd7f245771dce9dd7e4 100644 (file)
@@ -31,4 +31,8 @@ SET(INC
   ../blenkernel ../ftfont
 )
 
+IF(WITH_INTERNATIONAL)
+  ADD_DEFINITIONS(-DWITH_FREETYPE2)
+ENDIF(WITH_INTERNATIONAL)
+
 BLENDERLIB(bf_blenfont "${SRC}" "${INC}")
\ No newline at end of file
index a21150661fa3d219a96ae535fea4a2f6daf950f0..009b96f90b1fe4a654dae65166ec7ca05fa6a4e4 100644 (file)
@@ -8,4 +8,7 @@ incs = '. intern  #/intern/guardedalloc ../blenkernel ../blenlib ../makesdna ../
 
 defs = ''
 
+if env['WITH_BF_INTERNATIONAL']:
+       defs += ' WITH_FREETYPE2'
+
 env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs), libtype=['core'], priority=[210] )
index 527656f67b061f4d0aa2367e2f3bf14ae2e85832..0aaf399cf586a7708e8d0709bffbd518e31ac1e3 100644 (file)
@@ -42,7 +42,9 @@
 #include "blf_internal_types.h"
 
 // XXX 2.50 Remove this later.
+#ifdef WITH_FREETYPE2
 #include "FTF_Api.h"
+#endif
 
 static ListBase global_lang= { NULL, NULL };
 static int global_tot_lang= 0;
@@ -99,12 +101,14 @@ char *BLF_lang_find_code(short langid)
 
 void BLF_lang_set(int id)
 {
+#ifdef WITH_FREETYPE2
        LangBLF *lme;
 
        // XXX 2.50 Remove this later, with ftfont
        lme= blf_lang_find_by_id(id);
        if(lme) FTF_SetLanguage(lme->code);
        else FTF_SetLanguage("en_US");
+#endif
 }
 
 static void blf_lang_split(char *line, LangBLF* lme)