Addes jpeg2000 support to cmake.

I also did some small tweaks.  removed ifdef's for pluginapi
didn't need them there.
Fixed it so the filesel shows jp2 as image files.
(I'm going to do makefiles next)

Kent
This commit is contained in:
Kent Mein
2009-03-06 15:46:13 +00:00
parent 51b3bba1c0
commit 78af62bec8
10 changed files with 63 additions and 6 deletions

View File

@@ -63,7 +63,7 @@ OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF)
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_DDS "Enable DDS Support" ON) OPTION(WITH_DDS "Enable DDS Support" ON)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) OPTION(WITH_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF) OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF)
@@ -431,6 +431,9 @@ SET(FTGL ${CMAKE_SOURCE_DIR}/extern/bFTGL)
SET(FTGL_INC ${FTGL}/include) SET(FTGL_INC ${FTGL}/include)
SET(FTGL_LIB extern_ftgl) SET(FTGL_LIB extern_ftgl)
set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
set(OPENJPEG_INC ${OPENJPEG})
set(OPENJPEG_LIb extern_libopenjpeg)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Blender WebPlugin # Blender WebPlugin

View File

@@ -104,6 +104,7 @@ IF(UNIX)
bf_blenlib bf_blenlib
bf_cineon bf_cineon
bf_openexr bf_openexr
extern_libopenjpeg
bf_dds bf_dds
bf_ftfont bf_ftfont
extern_ftgl extern_ftgl

View File

@@ -46,3 +46,6 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SUBDIRS(glew) SUBDIRS(glew)
IF(WITH_OPENJPEG)
SUBDIRS(libopenjpeg)
ENDIF(WITH_OPENJPEG)

32
extern/libopenjpeg/CMakeLists.txt vendored Normal file
View File

@@ -0,0 +1,32 @@
# $Id: CMakeLists.txt 14444 2008-04-16 22:40:48Z hos $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Jacques Beaurain.
#
# ***** END GPL LICENSE BLOCK *****
SET(INC . src ${FREETYPE_INC})
FILE(GLOB SRC *.c except t1_generate_luts.c)
ADD_DEFINITIONS(-DWITH_OPENJPEG)
BLENDERLIB(extern_libopenjpeg "${SRC}" "${INC}")
#, libtype=['international','player'], priority=[5, 210])

View File

@@ -47,6 +47,10 @@ IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR) ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_DDS) IF(WITH_DDS)
ADD_DEFINITIONS(-DWITH_DDS) ADD_DEFINITIONS(-DWITH_DDS)
ENDIF(WITH_DDS) ENDIF(WITH_DDS)

View File

@@ -45,6 +45,8 @@
#define IB_zbuf (1 << 13) #define IB_zbuf (1 << 13)
#define IB_rgba (1 << 14) #define IB_rgba (1 << 14)
#define JP2 (1 << 18)
#define AMI (1 << 31) #define AMI (1 << 31)
#define PNG (1 << 30) #define PNG (1 << 30)
#define Anim (1 << 29) #define Anim (1 << 29)
@@ -56,10 +58,6 @@
#endif #endif
#define RADHDR (1<<24) #define RADHDR (1<<24)
#ifdef WITH_OPENJPEG
#define JP2 (1 << 18)
#endif
#define RAWTGA (TGA | 1) #define RAWTGA (TGA | 1)
#define JPG_STD (JPG | (0 << 8)) #define JPG_STD (JPG | (0 << 8))

View File

@@ -33,6 +33,7 @@ SET(INC
${PNG_INC} ${PNG_INC}
${TIFF_INC} ${TIFF_INC}
${ZLIB_INC} ${ZLIB_INC}
${OPENJPEG_INC}
) )
IF(WITH_VERSE) IF(WITH_VERSE)
@@ -44,6 +45,10 @@ IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR) ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_QUICKTIME) IF(WITH_QUICKTIME)
SET(INC ${INC} ${QUICKTIME_INC}) SET(INC ${INC} ${QUICKTIME_INC})
ADD_DEFINITIONS(-DWITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME)

View File

@@ -50,6 +50,10 @@ IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR) ENDIF(WITH_OPENEXR)
IF(WITH_OPENJPEG)
ADD_DEFINITIONS(-DWITH_OPENJPEG)
ENDIF(WITH_OPENJPEG)
IF(WITH_QUICKTIME) IF(WITH_QUICKTIME)
SET(INC ${INC} ${QUICKTIME_INC}) SET(INC ${INC} ${QUICKTIME_INC})
ADD_DEFINITIONS(-DWITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME)

View File

@@ -380,6 +380,9 @@ void test_flags_file(SpaceFile *sfile)
} else if (G.have_quicktime){ } else if (G.have_quicktime){
if( BLI_testextensie(file->relname, ".jpg") if( BLI_testextensie(file->relname, ".jpg")
|| BLI_testextensie(file->relname, ".jpeg") || BLI_testextensie(file->relname, ".jpeg")
#ifdef WITH_OPENJPEG
|| BLI_testextensie(file->relname, ".jp2")
#endif
|| BLI_testextensie(file->relname, ".hdr") || BLI_testextensie(file->relname, ".hdr")
|| BLI_testextensie(file->relname, ".exr") || BLI_testextensie(file->relname, ".exr")
|| BLI_testextensie(file->relname, ".tga") || BLI_testextensie(file->relname, ".tga")
@@ -414,6 +417,9 @@ void test_flags_file(SpaceFile *sfile)
} }
} else { // no quicktime } else { // no quicktime
if(BLI_testextensie(file->relname, ".jpg") if(BLI_testextensie(file->relname, ".jpg")
#ifdef WITH_OPENJPEG
|| BLI_testextensie(file->relname, ".jp2")
#endif
|| BLI_testextensie(file->relname, ".hdr") || BLI_testextensie(file->relname, ".hdr")
|| BLI_testextensie(file->relname, ".exr") || BLI_testextensie(file->relname, ".exr")
|| BLI_testextensie(file->relname, ".tga") || BLI_testextensie(file->relname, ".tga")

View File

@@ -267,6 +267,7 @@ IF(UNIX)
bf_quicktime bf_quicktime
extern_binreloc extern_binreloc
extern_glew extern_glew
extern_libopenjpeg
bf_videotex bf_videotex
) )