[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40340] trunk/blender: remove WITH_* defines from image formats, instead just dont build the files at all.

Campbell Barton ideasman42 at gmail.com
Mon Sep 19 08:32:20 CEST 2011


Revision: 40340
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40340
Author:   campbellbarton
Date:     2011-09-19 06:32:19 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
remove WITH_* defines from image formats, instead just dont build the files at all.

Modified Paths:
--------------
    trunk/blender/extern/glew/include/GL/glew.h
    trunk/blender/source/blender/imbuf/CMakeLists.txt
    trunk/blender/source/blender/imbuf/SConscript
    trunk/blender/source/blender/imbuf/intern/IMB_anim.h
    trunk/blender/source/blender/imbuf/intern/IMB_indexer.h
    trunk/blender/source/blender/imbuf/intern/imbuf.h
    trunk/blender/source/blender/imbuf/intern/jp2.c
    trunk/blender/source/blender/imbuf/intern/radiance_hdr.c
    trunk/blender/source/blender/imbuf/intern/tiff.c

Modified: trunk/blender/extern/glew/include/GL/glew.h
===================================================================
--- trunk/blender/extern/glew/include/GL/glew.h	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/extern/glew/include/GL/glew.h	2011-09-19 06:32:19 UTC (rev 40340)
@@ -16085,7 +16085,7 @@
 
 #else /* GLEW_MX */
 
-GLEWAPI GLenum glewInit ();
+GLEWAPI GLenum glewInit (void);
 GLEWAPI GLboolean glewIsSupported (const char* name);
 #define glewIsExtensionSupported(x) glewIsSupported(x)
 

Modified: trunk/blender/source/blender/imbuf/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/imbuf/CMakeLists.txt	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/CMakeLists.txt	2011-09-19 06:32:19 UTC (rev 40340)
@@ -58,13 +58,11 @@
 	intern/indexer.c
 	intern/indexer_dv.c
 	intern/iris.c
-	intern/jp2.c
 	intern/jpeg.c
 	intern/md5.c
 	intern/metadata.c
 	intern/module.c
 	intern/png.c
-	intern/radiance_hdr.c
 	intern/readimage.c
 	intern/rectop.c
 	intern/rotate.c
@@ -72,7 +70,6 @@
 	intern/targa.c
 	intern/thumbs.c
 	intern/thumbs_blend.c
-	intern/tiff.c
 	intern/util.c
 	intern/writeimage.c
 
@@ -119,6 +116,10 @@
 	list(APPEND INC_SYS
 		${TIFF_INCLUDE_DIR}
 	)
+	list(APPEND SRC
+		intern/tiff.c
+	)
+
 	add_definitions(-DWITH_TIFF)
 endif()
 
@@ -126,6 +127,10 @@
 	list(APPEND INC_SYS
 		${OPENJPEG_INCLUDE_DIRS}
 	)
+	list(APPEND SRC
+		intern/jp2.c
+	)
+
 	add_definitions(-DWITH_OPENJPEG)
 endif()
 
@@ -165,6 +170,9 @@
 endif()
 
 if(WITH_IMAGE_HDR)
+	list(APPEND SRC
+		intern/radiance_hdr.c
+	)
 	add_definitions(-DWITH_HDR)
 endif()
 

Modified: trunk/blender/source/blender/imbuf/SConscript
===================================================================
--- trunk/blender/source/blender/imbuf/SConscript	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/SConscript	2011-09-19 06:32:19 UTC (rev 40340)
@@ -22,6 +22,8 @@
 
 if env['WITH_BF_TIFF']:
     defs.append('WITH_TIFF')
+else:
+	sources.remove('intern/tiff.c')
 
 if env['WITH_BF_DDS']:
     defs.append('WITH_DDS')
@@ -31,6 +33,8 @@
 
 if env['WITH_BF_HDR']:
     defs.append('WITH_HDR')
+else:
+	sources.remove('intern/radiance_hdr.c')
 
 if env['WITH_BF_FFMPEG']:
     defs.append('WITH_FFMPEG')
@@ -39,6 +43,8 @@
 if env['WITH_BF_OPENJPEG']:
     defs.append('WITH_OPENJPEG')
     incs += ' ' + env['BF_OPENJPEG_INC']
+else:
+	sources.remove('intern/jp2.c')
 
 if env['WITH_BF_REDCODE']:
     defs.append('WITH_REDCODE')

Modified: trunk/blender/source/blender/imbuf/intern/IMB_anim.h
===================================================================
--- trunk/blender/source/blender/imbuf/intern/IMB_anim.h	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/intern/IMB_anim.h	2011-09-19 06:32:19 UTC (rev 40340)
@@ -38,21 +38,21 @@
 #define IMB_ANIM_H
 
 #ifdef _WIN32
-#define INC_OLE2
-#include <windows.h>
-#include <windowsx.h>
-#include <mmsystem.h>
-#include <memory.h>
-#include <commdlg.h>
+#  define INC_OLE2
+#  include <windows.h>
+#  include <windowsx.h>
+#  include <mmsystem.h>
+#  include <memory.h>
+#  include <commdlg.h>
 
-#ifndef FREE_WINDOWS
-#include <vfw.h>
-#endif
+#  ifndef FREE_WINDOWS
+#    include <vfw.h>
+#  endif
 
-#undef AVIIF_KEYFRAME // redefined in AVI_avi.h
-#undef AVIIF_LIST // redefined in AVI_avi.h
+#  undef AVIIF_KEYFRAME // redefined in AVI_avi.h
+#  undef AVIIF_LIST // redefined in AVI_avi.h
 
-#define FIXCC(fcc)  if (fcc == 0)	fcc = mmioFOURCC('N', 'o', 'n', 'e'); \
+#  define FIXCC(fcc)  if (fcc == 0)	fcc = mmioFOURCC('N', 'o', 'n', 'e'); \
 		if (fcc == BI_RLE8) fcc = mmioFOURCC('R', 'l', 'e', '8');
 #endif
 
@@ -60,10 +60,11 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <stdio.h>
-#ifndef _WIN32
-#include <dirent.h>
+
+#ifdef _WIN32
+#  include <io.h>
 #else
-#include <io.h>
+#  include <dirent.h>
 #endif
 
 #include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
@@ -74,24 +75,24 @@
 #include "AVI_avi.h"
 
 #ifdef WITH_QUICKTIME
-#if defined(_WIN32) || defined(__APPLE__)
-#include "quicktime_import.h"
-#endif /* _WIN32 || __APPLE__ */
+#  if defined(_WIN32) || defined(__APPLE__)
+#    include "quicktime_import.h"
+#  endif /* _WIN32 || __APPLE__ */
 #endif /* WITH_QUICKTIME */
 
 #ifdef WITH_FFMPEG
-#include <libavformat/avformat.h>
-#include <libavcodec/avcodec.h>
-#include <libswscale/swscale.h>
+#  include <libavformat/avformat.h>
+#  include <libavcodec/avcodec.h>
+#  include <libswscale/swscale.h>
 #endif
 
 #ifdef WITH_REDCODE
-#ifdef _WIN32 /* on windows we use the one in extern instead */
-#include "libredcode/format.h"
-#else
-#include "libredcode/format.h"
+#  ifdef _WIN32 /* on windows we use the one in extern instead */
+#    include "libredcode/format.h"
+#  else
+#    include "libredcode/format.h"
+#  endif
 #endif
-#endif
 
 #include "IMB_imbuf_types.h"
 #include "IMB_imbuf.h"

Modified: trunk/blender/source/blender/imbuf/intern/IMB_indexer.h
===================================================================
--- trunk/blender/source/blender/imbuf/intern/IMB_indexer.h	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/intern/IMB_indexer.h	2011-09-19 06:32:19 UTC (rev 40340)
@@ -28,7 +28,7 @@
 #define IMB_INDEXER_H
 
 #ifdef WIN32
-#include <io.h>
+#  include <io.h>
 #endif
 
 #include <stdlib.h>

Modified: trunk/blender/source/blender/imbuf/intern/imbuf.h
===================================================================
--- trunk/blender/source/blender/imbuf/intern/imbuf.h	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/intern/imbuf.h	2011-09-19 06:32:19 UTC (rev 40340)
@@ -44,7 +44,7 @@
 #include <stdio.h> 
 
 #ifndef WIN32
-#include <unistd.h> 
+#  include <unistd.h>
 #endif
 
 #include <fcntl.h>
@@ -53,28 +53,25 @@
 #include <math.h>
 
 #ifndef WIN32
-#include <sys/mman.h>
+#  include <sys/mman.h>
+#  define O_BINARY 0
 #endif
 
-#if !defined(WIN32)
-#define O_BINARY 0
-#endif
-
 #define SWAP_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & 0xff))
 #define SWAP_LONG(x) (((x) << 24) | (((x) & 0xff00) << 8) | (((x) >> 8) & 0xff00) | (((x) >> 24) & 0xff))
 
 #define ENDIAN_NOP(x) (x)
 
 #if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__hppa__) || (defined (__APPLE__) && !defined(__LITTLE_ENDIAN__))
-#define LITTLE_SHORT SWAP_SHORT
-#define LITTLE_LONG SWAP_LONG
-#define BIG_SHORT ENDIAN_NOP
-#define BIG_LONG ENDIAN_NOP
+#  define LITTLE_SHORT SWAP_SHORT
+#  define LITTLE_LONG SWAP_LONG
+#  define BIG_SHORT ENDIAN_NOP
+#  define BIG_LONG ENDIAN_NOP
 #else
-#define LITTLE_SHORT ENDIAN_NOP
-#define LITTLE_LONG ENDIAN_NOP
-#define BIG_SHORT SWAP_SHORT
-#define BIG_LONG SWAP_LONG
+#  define LITTLE_SHORT ENDIAN_NOP
+#  define LITTLE_LONG ENDIAN_NOP
+#  define BIG_SHORT SWAP_SHORT
+#  define BIG_LONG SWAP_LONG
 #endif
 
 typedef unsigned char uchar;

Modified: trunk/blender/source/blender/imbuf/intern/jp2.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/jp2.c	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/intern/jp2.c	2011-09-19 06:32:19 UTC (rev 40340)
@@ -25,9 +25,6 @@
  *  \ingroup imbuf
  */
 
-
-#ifdef WITH_OPENJPEG
-
 #include "MEM_guardedalloc.h"
 
 #include "BLI_blenlib.h"
@@ -751,5 +748,3 @@
 	
 	return 1;
 }
-
-#endif /* WITH_OPENJPEG */

Modified: trunk/blender/source/blender/imbuf/intern/radiance_hdr.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/radiance_hdr.c	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/intern/radiance_hdr.c	2011-09-19 06:32:19 UTC (rev 40340)
@@ -33,9 +33,6 @@
  *  \ingroup imbuf
  */
 
-
-#ifdef WITH_HDR
-
 /* ----------------------------------------------------------------------
   Radiance High Dynamic Range image file IO
   For description and code for reading/writing of radiance hdr files 
@@ -45,7 +42,7 @@
 */
 
 #ifdef WIN32
-#include <io.h>
+#  include <io.h>
 #endif
 
 #include "MEM_guardedalloc.h"
@@ -369,5 +366,3 @@
 	fclose(file);
 	return 1;
 }
-
-#endif /* WITH_HDR */

Modified: trunk/blender/source/blender/imbuf/intern/tiff.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/tiff.c	2011-09-19 05:58:52 UTC (rev 40339)
+++ trunk/blender/source/blender/imbuf/intern/tiff.c	2011-09-19 06:32:19 UTC (rev 40340)
@@ -45,8 +45,6 @@
  * used to compress images.
  */
 
-#ifdef WITH_TIFF
-
 #include <string.h>
 
 #include "imbuf.h"
@@ -836,5 +834,3 @@
 	if(pixels16) _TIFFfree(pixels16);
 	return (1);
 }
-
-#endif /* WITH_TIFF */




More information about the Bf-blender-cvs mailing list