[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19211] trunk/blender: Addes jpeg2000 support to cmake.

Kent Mein mein at cs.umn.edu
Fri Mar 6 16:46:14 CET 2009


Revision: 19211
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19211
Author:   sirdude
Date:     2009-03-06 16:46:13 +0100 (Fri, 06 Mar 2009)

Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/blenderplayer/CMakeLists.txt
    trunk/blender/extern/CMakeLists.txt
    trunk/blender/source/blender/blenkernel/CMakeLists.txt
    trunk/blender/source/blender/blenpluginapi/iff.h
    trunk/blender/source/blender/imbuf/CMakeLists.txt
    trunk/blender/source/blender/src/CMakeLists.txt
    trunk/blender/source/blender/src/filesel.c
    trunk/blender/source/creator/CMakeLists.txt

Added Paths:
-----------
    trunk/blender/extern/libopenjpeg/CMakeLists.txt

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -63,7 +63,7 @@
 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_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

Modified: trunk/blender/blenderplayer/CMakeLists.txt
===================================================================
--- trunk/blender/blenderplayer/CMakeLists.txt	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/blenderplayer/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -104,6 +104,7 @@
     bf_blenlib 
     bf_cineon 
     bf_openexr 
+    extern_libopenjpeg 
     bf_dds
     bf_ftfont 
     extern_ftgl 

Modified: trunk/blender/extern/CMakeLists.txt
===================================================================
--- trunk/blender/extern/CMakeLists.txt	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/extern/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -29,7 +29,7 @@
 ENDIF(WITH_GAMEENGINE)
 
 IF(WITH_BULLET)
-    SUBDIRS(bullet2)
+  SUBDIRS(bullet2)
 ENDIF(WITH_BULLET)
 
 IF(WITH_INTERNATIONAL)
@@ -46,3 +46,6 @@
 
 SUBDIRS(glew)
 
+IF(WITH_OPENJPEG)
+  SUBDIRS(libopenjpeg)
+ENDIF(WITH_OPENJPEG)

Added: trunk/blender/extern/libopenjpeg/CMakeLists.txt
===================================================================
--- trunk/blender/extern/libopenjpeg/CMakeLists.txt	                        (rev 0)
+++ trunk/blender/extern/libopenjpeg/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -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])

Modified: trunk/blender/source/blender/blenkernel/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/blenkernel/CMakeLists.txt	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/source/blender/blenkernel/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -47,6 +47,10 @@
   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)

Modified: trunk/blender/source/blender/blenpluginapi/iff.h
===================================================================
--- trunk/blender/source/blender/blenpluginapi/iff.h	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/source/blender/blenpluginapi/iff.h	2009-03-06 15:46:13 UTC (rev 19211)
@@ -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))

Modified: trunk/blender/source/blender/imbuf/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/imbuf/CMakeLists.txt	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/source/blender/imbuf/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -33,6 +33,7 @@
   ${PNG_INC}
   ${TIFF_INC}
   ${ZLIB_INC}
+  ${OPENJPEG_INC}
 )
 
 IF(WITH_VERSE)
@@ -44,6 +45,10 @@
   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)

Modified: trunk/blender/source/blender/src/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/src/CMakeLists.txt	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/source/blender/src/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -50,6 +50,10 @@
   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)

Modified: trunk/blender/source/blender/src/filesel.c
===================================================================
--- trunk/blender/source/blender/src/filesel.c	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/source/blender/src/filesel.c	2009-03-06 15:46:13 UTC (rev 19211)
@@ -380,6 +380,9 @@
 			} 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 @@
 				}
 			} 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")

Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt	2009-03-06 14:58:37 UTC (rev 19210)
+++ trunk/blender/source/creator/CMakeLists.txt	2009-03-06 15:46:13 UTC (rev 19211)
@@ -267,6 +267,7 @@
     bf_quicktime
     extern_binreloc
     extern_glew
+    extern_libopenjpeg
     bf_videotex
   )
 





More information about the Bf-blender-cvs mailing list