diff options
author | Kent Mein <mein@cs.umn.edu> | 2009-03-06 18:46:13 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2009-03-06 18:46:13 +0300 |
commit | 78af62bec81467fae5994547919aa255361e8f18 (patch) | |
tree | e92aba060dbf865bdd132463ab5761780def1b99 | |
parent | 51b3bba1c01bbb89586b44c21501bbe4749b03ad (diff) |
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
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | blenderplayer/CMakeLists.txt | 1 | ||||
-rw-r--r-- | extern/CMakeLists.txt | 5 | ||||
-rw-r--r-- | extern/libopenjpeg/CMakeLists.txt | 32 | ||||
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/blenpluginapi/iff.h | 6 | ||||
-rw-r--r-- | source/blender/imbuf/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/src/filesel.c | 6 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 1 |
10 files changed, 63 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b96ca585a6..0b7f3999e82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF) OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" 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_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF) 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_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_LIB extern_ftgl) +set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg) +set(OPENJPEG_INC ${OPENJPEG}) +set(OPENJPEG_LIb extern_libopenjpeg) #----------------------------------------------------------------------------- # Blender WebPlugin diff --git a/blenderplayer/CMakeLists.txt b/blenderplayer/CMakeLists.txt index f02650f7ea0..b9ac3c7a8c6 100644 --- a/blenderplayer/CMakeLists.txt +++ b/blenderplayer/CMakeLists.txt @@ -104,6 +104,7 @@ IF(UNIX) bf_blenlib bf_cineon bf_openexr + extern_libopenjpeg bf_dds bf_ftfont extern_ftgl diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index ee5cab31e09..b81efb52de9 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -29,7 +29,7 @@ IF(WITH_GAMEENGINE) ENDIF(WITH_GAMEENGINE) IF(WITH_BULLET) - SUBDIRS(bullet2) + SUBDIRS(bullet2) ENDIF(WITH_BULLET) IF(WITH_INTERNATIONAL) @@ -46,3 +46,6 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") SUBDIRS(glew) +IF(WITH_OPENJPEG) + SUBDIRS(libopenjpeg) +ENDIF(WITH_OPENJPEG) diff --git a/extern/libopenjpeg/CMakeLists.txt b/extern/libopenjpeg/CMakeLists.txt new file mode 100644 index 00000000000..c179d5328b9 --- /dev/null +++ b/extern/libopenjpeg/CMakeLists.txt @@ -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]) diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 04ca5c79a11..27be1b45779 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -47,6 +47,10 @@ IF(WITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) ENDIF(WITH_OPENEXR) +IF(WITH_OPENJPEG) + ADD_DEFINITIONS(-DWITH_OPENJPEG) +ENDIF(WITH_OPENJPEG) + IF(WITH_DDS) ADD_DEFINITIONS(-DWITH_DDS) ENDIF(WITH_DDS) diff --git a/source/blender/blenpluginapi/iff.h b/source/blender/blenpluginapi/iff.h index e7f328d870f..9378cdc9134 100644 --- a/source/blender/blenpluginapi/iff.h +++ b/source/blender/blenpluginapi/iff.h @@ -45,6 +45,8 @@ #define IB_zbuf (1 << 13) #define IB_rgba (1 << 14) +#define JP2 (1 << 18) + #define AMI (1 << 31) #define PNG (1 << 30) #define Anim (1 << 29) @@ -56,10 +58,6 @@ #endif #define RADHDR (1<<24) -#ifdef WITH_OPENJPEG -#define JP2 (1 << 18) -#endif - #define RAWTGA (TGA | 1) #define JPG_STD (JPG | (0 << 8)) diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index 2d41a6d73e6..9894aa8136e 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -33,6 +33,7 @@ SET(INC ${PNG_INC} ${TIFF_INC} ${ZLIB_INC} + ${OPENJPEG_INC} ) IF(WITH_VERSE) @@ -44,6 +45,10 @@ IF(WITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) ENDIF(WITH_OPENEXR) +IF(WITH_OPENJPEG) + ADD_DEFINITIONS(-DWITH_OPENJPEG) +ENDIF(WITH_OPENJPEG) + IF(WITH_QUICKTIME) SET(INC ${INC} ${QUICKTIME_INC}) ADD_DEFINITIONS(-DWITH_QUICKTIME) diff --git a/source/blender/src/CMakeLists.txt b/source/blender/src/CMakeLists.txt index e2757dbc75d..dc2928cd17b 100644 --- a/source/blender/src/CMakeLists.txt +++ b/source/blender/src/CMakeLists.txt @@ -50,6 +50,10 @@ IF(WITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) ENDIF(WITH_OPENEXR) +IF(WITH_OPENJPEG) + ADD_DEFINITIONS(-DWITH_OPENJPEG) +ENDIF(WITH_OPENJPEG) + IF(WITH_QUICKTIME) SET(INC ${INC} ${QUICKTIME_INC}) ADD_DEFINITIONS(-DWITH_QUICKTIME) diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index ee1fc523395..9800c80b57d 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -380,6 +380,9 @@ void test_flags_file(SpaceFile *sfile) } else if (G.have_quicktime){ if( BLI_testextensie(file->relname, ".jpg") || BLI_testextensie(file->relname, ".jpeg") +#ifdef WITH_OPENJPEG + || BLI_testextensie(file->relname, ".jp2") +#endif || BLI_testextensie(file->relname, ".hdr") || BLI_testextensie(file->relname, ".exr") || BLI_testextensie(file->relname, ".tga") @@ -414,6 +417,9 @@ void test_flags_file(SpaceFile *sfile) } } else { // no quicktime if(BLI_testextensie(file->relname, ".jpg") +#ifdef WITH_OPENJPEG + || BLI_testextensie(file->relname, ".jp2") +#endif || BLI_testextensie(file->relname, ".hdr") || BLI_testextensie(file->relname, ".exr") || BLI_testextensie(file->relname, ".tga") diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index ee6f19e457d..8e2a906614d 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -267,6 +267,7 @@ IF(UNIX) bf_quicktime extern_binreloc extern_glew + extern_libopenjpeg bf_videotex ) |