remove WITH_* defines from image formats, instead just dont build the files at all.

This commit is contained in:
2011-09-19 06:32:19 +00:00
parent 049838fe0c
commit 425a81a29b
9 changed files with 58 additions and 60 deletions

View File

@@ -16085,7 +16085,7 @@ GLEWAPI GLboolean glewContextIsSupported (const GLEWContext* ctx, const char* na
#else /* GLEW_MX */ #else /* GLEW_MX */
GLEWAPI GLenum glewInit (); GLEWAPI GLenum glewInit (void);
GLEWAPI GLboolean glewIsSupported (const char* name); GLEWAPI GLboolean glewIsSupported (const char* name);
#define glewIsExtensionSupported(x) glewIsSupported(x) #define glewIsExtensionSupported(x) glewIsSupported(x)

View File

@@ -58,13 +58,11 @@ set(SRC
intern/indexer.c intern/indexer.c
intern/indexer_dv.c intern/indexer_dv.c
intern/iris.c intern/iris.c
intern/jp2.c
intern/jpeg.c intern/jpeg.c
intern/md5.c intern/md5.c
intern/metadata.c intern/metadata.c
intern/module.c intern/module.c
intern/png.c intern/png.c
intern/radiance_hdr.c
intern/readimage.c intern/readimage.c
intern/rectop.c intern/rectop.c
intern/rotate.c intern/rotate.c
@@ -72,7 +70,6 @@ set(SRC
intern/targa.c intern/targa.c
intern/thumbs.c intern/thumbs.c
intern/thumbs_blend.c intern/thumbs_blend.c
intern/tiff.c
intern/util.c intern/util.c
intern/writeimage.c intern/writeimage.c
@@ -119,6 +116,10 @@ if(WITH_IMAGE_TIFF)
list(APPEND INC_SYS list(APPEND INC_SYS
${TIFF_INCLUDE_DIR} ${TIFF_INCLUDE_DIR}
) )
list(APPEND SRC
intern/tiff.c
)
add_definitions(-DWITH_TIFF) add_definitions(-DWITH_TIFF)
endif() endif()
@@ -126,6 +127,10 @@ if(WITH_IMAGE_OPENJPEG)
list(APPEND INC_SYS list(APPEND INC_SYS
${OPENJPEG_INCLUDE_DIRS} ${OPENJPEG_INCLUDE_DIRS}
) )
list(APPEND SRC
intern/jp2.c
)
add_definitions(-DWITH_OPENJPEG) add_definitions(-DWITH_OPENJPEG)
endif() endif()
@@ -165,6 +170,9 @@ if(WITH_IMAGE_CINEON)
endif() endif()
if(WITH_IMAGE_HDR) if(WITH_IMAGE_HDR)
list(APPEND SRC
intern/radiance_hdr.c
)
add_definitions(-DWITH_HDR) add_definitions(-DWITH_HDR)
endif() endif()

View File

@@ -22,6 +22,8 @@ if env['WITH_BF_OPENEXR']:
if env['WITH_BF_TIFF']: if env['WITH_BF_TIFF']:
defs.append('WITH_TIFF') defs.append('WITH_TIFF')
else:
sources.remove('intern/tiff.c')
if env['WITH_BF_DDS']: if env['WITH_BF_DDS']:
defs.append('WITH_DDS') defs.append('WITH_DDS')
@@ -31,6 +33,8 @@ if env['WITH_BF_CINEON']:
if env['WITH_BF_HDR']: if env['WITH_BF_HDR']:
defs.append('WITH_HDR') defs.append('WITH_HDR')
else:
sources.remove('intern/radiance_hdr.c')
if env['WITH_BF_FFMPEG']: if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG') defs.append('WITH_FFMPEG')
@@ -39,6 +43,8 @@ if env['WITH_BF_FFMPEG']:
if env['WITH_BF_OPENJPEG']: if env['WITH_BF_OPENJPEG']:
defs.append('WITH_OPENJPEG') defs.append('WITH_OPENJPEG')
incs += ' ' + env['BF_OPENJPEG_INC'] incs += ' ' + env['BF_OPENJPEG_INC']
else:
sources.remove('intern/jp2.c')
if env['WITH_BF_REDCODE']: if env['WITH_BF_REDCODE']:
defs.append('WITH_REDCODE') defs.append('WITH_REDCODE')

View File

@@ -60,10 +60,11 @@
#include <ctype.h> #include <ctype.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef _WIN32
#include <dirent.h> #ifdef _WIN32
#else
# include <io.h> # include <io.h>
#else
# include <dirent.h>
#endif #endif
#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail #include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail

View File

@@ -54,9 +54,6 @@
#ifndef WIN32 #ifndef WIN32
# include <sys/mman.h> # include <sys/mman.h>
#endif
#if !defined(WIN32)
# define O_BINARY 0 # define O_BINARY 0
#endif #endif

View File

@@ -25,9 +25,6 @@
* \ingroup imbuf * \ingroup imbuf
*/ */
#ifdef WITH_OPENJPEG
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
#include "BLI_blenlib.h" #include "BLI_blenlib.h"
@@ -751,5 +748,3 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags) {
return 1; return 1;
} }
#endif /* WITH_OPENJPEG */

View File

@@ -33,9 +33,6 @@
* \ingroup imbuf * \ingroup imbuf
*/ */
#ifdef WITH_HDR
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
Radiance High Dynamic Range image file IO Radiance High Dynamic Range image file IO
For description and code for reading/writing of radiance hdr files For description and code for reading/writing of radiance hdr files
@@ -369,5 +366,3 @@ int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags)
fclose(file); fclose(file);
return 1; return 1;
} }
#endif /* WITH_HDR */

View File

@@ -45,8 +45,6 @@
* used to compress images. * used to compress images.
*/ */
#ifdef WITH_TIFF
#include <string.h> #include <string.h>
#include "imbuf.h" #include "imbuf.h"
@@ -836,5 +834,3 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
if(pixels16) _TIFFfree(pixels16); if(pixels16) _TIFFfree(pixels16);
return (1); return (1);
} }
#endif /* WITH_TIFF */