OpenEXR support for Windows Makefiles
authorChris Want <cwant@ualberta.ca>
Tue, 10 Jan 2006 06:29:57 +0000 (06:29 +0000)
committerChris Want <cwant@ualberta.ca>
Tue, 10 Jan 2006 06:29:57 +0000 (06:29 +0000)
source/Makefile
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/nan_definitions.mk
source/nan_link.mk

index 7b073259c8b5ce60bfb887b2763ca88817f9e956..87849f29f89cd42f21a1a74e314b44d519f4cbb5 100644 (file)
@@ -218,6 +218,10 @@ ifeq ($(OS), windows)
     endif
 endif
 
+ifeq ($(WITH_OPENEXR), true)
+    COMLIB += $(NAN_OPENEXR_LIBS)
+endif
+
     PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
     PULIB += $(NAN_MOTO)/lib/libmoto.a
     PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
index c90278c45146e5f261c8bb8d2049ee80c1b64471..6e1c31901ce3a2907c2d47a6dabfd7f403361bbe 100644 (file)
@@ -43,6 +43,19 @@ extern "C"
 
 #include <iostream>
 
+#if defined (_WIN32) && !defined(FREE_WINDOWS)
+#include <half.h>
+#include <IlmImf/ImfVersion.h>
+#include <IlmImf/ImfArray.h>
+#include <IlmImf/ImfIO.h>
+#include <IlmImf/ImfChannelList.h>
+#include <IlmImf/ImfPixelType.h>
+#include <IlmImf/ImfInputFile.h>
+#include <IlmImf/ImfOutputFile.h>
+#include <IlmImf/ImfCompression.h>
+#include <IlmImf/ImfCompressionAttribute.h>
+#include <Imath/ImathBox.h>
+#else
 #include <OpenEXR/half.h>
 #include <OpenEXR/ImfVersion.h>
 #include <OpenEXR/ImathBox.h>
@@ -54,6 +67,7 @@ extern "C"
 #include <OpenEXR/ImfOutputFile.h>
 #include <OpenEXR/ImfCompression.h>
 #include <OpenEXR/ImfCompressionAttribute.h>
+#endif
 
 using namespace Imf;
 using namespace Imath;
index db3d27bcb19580da2ad7b33c0dd9759f1e32e3ea..e7e3679f15b885f84c00935287150d22858ea75c 100644 (file)
@@ -94,10 +94,21 @@ endif
     endif
 
     export WITH_OPENEXR ?= true
-    export NAN_OPENEXR ?= /usr/local
-    export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR
-    export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a
-
+    ifeq ($(OS),windows)
+      ifeq ($(FREE_WINDOWS), true)
+        export NAN_OPENEXR ?= $(LCGDIR)/gcc/openexr
+        export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a
+        export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR
+      else
+        export NAN_OPENEXR ?= $(LCGDIR)/openexr
+        export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/IlmImf.lib $(NAN_OPENEXR)/lib/Half.lib $(NAN_OPENEXR)/lib/Iex.lib
+        export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/IlmImf -I$(NAN_OPENEXR)/include/Imath -I$(NAN_OPENEXR)/include/Iex
+      endif
+    else
+      export NAN_OPENEXR ?= /usr/local
+      export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR
+      export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a
+    endif
   # Platform Dependent settings go below:
 
   ifeq ($(OS),beos)
index 1156bf383dc5a409ceab86133200b73a0b4cccbc..c201b79a4126a350e4087bb81796e44099e4e280 100644 (file)
@@ -59,7 +59,7 @@ ifeq ($(OS),darwin)
     LLIBS    += -lGLU -lGL
     LLIBS    += -lz -lstdc++
     ifdef USE_OSX10.4STUBS
-       LLIBS    +=-lSystemStubs
+       LLIBS    +=-lSystemStubs
     endif 
     LLIBS    += -framework Carbon -framework AGL -framework OpenGL
     LLIBS    += -framework QuickTime -framework CoreAudio
@@ -157,7 +157,3 @@ endif
 ifneq ($(OS), irix)
    LLIBS += $(NAN_SDLLIBS)
 endif
-
-ifeq ($(WITH_OPENEXR), true)
-    LLIBS += $(NAN_OPENEXR_LIBS)
-endif