Hi,

I picked up compiling freepv from the branch_leonard again on OSX (I
considered to continue Tom Sharps mail thread about "How to view QTVRs on
Linux" but that subject is actually something else).
I patched FindFREEGlut.cmake for OSX (mght need some optimization). Please
find patch attached to this mail and add it to the branch_leonox. I don't
have access to the svn.

I found and downloaded a universal version of the the gecko-SDK (
http://www.danns.co.uk/HowToBuildUniversalSDK).

I used "cmake CMAKE_BUILD_TYPE="Release"
-DGECKO_NSPR_DIR=/Users/Shared/development/hugin_related/ExternalPrograms/gecko-sdk-mac-universal/include/
-DGECKO_ROOT_DIR=/Users/Shared/development/hugin_related/ExternalPrograms/gecko-sdk-mac-universal/include/
.."

I got a little further.
I'm now at :
Scanning dependencies of target npfreepv
[ 84%] Building CXX object
src/freepv-mozilla/CMakeFiles/npfreepv.dir/plugin.o
[ 86%] Building CXX object
src/freepv-mozilla/CMakeFiles/npfreepv.dir/plugin_unix.o
/Users/Shared/development/hugin_related/ExternalPrograms/branch_leonox/src/freepv-mozilla/plugin_unix.cpp:
In member function 'virtual NPError
FPV::nsPluginInstanceUnix::SetWindow(NPWindow*)':
/Users/Shared/development/hugin_related/ExternalPrograms/branch_leonox/src/freepv-mozilla/plugin_unix.cpp:286:
error: 'struct NPSetWindowCallbackStruct' has no member named 'visual'
/Users/Shared/development/hugin_related/ExternalPrograms/branch_leonox/src/freepv-mozilla/plugin_unix.cpp:287:
error: 'struct NPSetWindowCallbackStruct' has no member named 'depth'
/Users/Shared/development/hugin_related/ExternalPrograms/branch_leonox/src/freepv-mozilla/plugin_unix.cpp:288:
error: 'struct NPSetWindowCallbackStruct' has no member named 'colormap'
/Users/Shared/development/hugin_related/ExternalPrograms/branch_leonox/src/freepv-mozilla/plugin_unix.cpp:289:
error: 'struct NPSetWindowCallbackStruct' has no member named 'display'
make[2]: *** [src/freepv-mozilla/CMakeFiles/npfreepv.dir/plugin_unix.o]
Error 1
make[1]: *** [src/freepv-mozilla/CMakeFiles/npfreepv.dir/all] Error 2
make: *** [all] Error 2

I got around this one. It's for a X11 based Firefox so disable it on Apple
(I wanted to move on).
However, I got onto the next error as the openGL parts are also X11 based.

freepv is X11 based on all parts, also the OpenGL parts. This requires a lot
of rework from an (Apple) programmer (which I'm not. Not at all).

I've already spend a lot of time in this and I would like to test but I
can't solve these issues.

Hoi,
Hary

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---

Index: FindFREEGLUT.cmake
===================================================================
--- FindFREEGLUT.cmake	(revision 146)
+++ FindFREEGLUT.cmake	(working copy)
@@ -12,21 +12,63 @@
 IF(WIN32)
 	FIND_PATH(FREEGLUT_INCLUDE_DIR GL/freeglut.h ${CMAKE_INCLUDE_PATH} $ENV{include} ${OPENGL_INCLUDE_DIR})
 	FIND_LIBRARY(FREEGLUT_LIBRARY NAMES freeglut_static PATH ${CMAKE_LIBRARY_PATH} $ENV{lib}) 
+ELSEIF(APPLE)
+   # These values for Apple could probably do with improvement.
+     FIND_PATH( GLUT_INCLUDE_DIR glut.h
+      /System/Library/Frameworks/GLUT.framework/Versions/A/Headers
+      ${OPENGL_LIBRARY_DIR}
+    )
+    SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX") 
+    SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
 ELSE(WIN32)
-	FIND_PATH(FREEGLUT_INCLUDE_DIR GL/freeglut.h /usr/include /usr/local/include)
-	FIND_LIBRARY( FREEGLUT_LIBRARY NAMES freeglut glut
-      		/usr/lib
-      		/usr/local/lib
-    	)
+        FIND_PATH(FREEGLUT_INCLUDE_DIR GL/freeglut.h /usr/include /usr/local/include)
+        FIND_LIBRARY( FREEGLUT_LIBRARY NAMES freeglut glut
+                /usr/lib
+                /usr/local/lib
+        )
 ENDIF(WIN32)
+
+IF(APPLE)
+  SET( GLUT_FOUND "NO" )
+  IF(GLUT_INCLUDE_DIR)
+    IF(GLUT_glut_LIBRARY)
+      # Is -lXi and -lXmu required on all platforms that have it?
+      # If not, we need some way to figure out what platform we are on.
+      SET( GLUT_LIBRARIES
+        ${GLUT_glut_LIBRARY}
+        ${GLUT_Xmu_LIBRARY}
+        ${GLUT_Xi_LIBRARY} 
+        ${GLUT_cocoa_LIBRARY}
+      )
+      SET( GLUT_FOUND "YES" )
 
-IF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)
-   SET(FREEGLUT_FOUND TRUE)
-   SET(FREEGLUT_LIBRARIES ${FREEGLUT_LIBRARY})
-ENDIF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)
+#The following deprecated settings are for backwards compatibility with CMake1.4
+# To make this compatible with freeglut
+      SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
+      SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
+      SET(FREEGLUT_FOUND TRUE)
+      SET(FREEGLUT_LIBRARIES ${GLUT_LIBRARIES})
+      SET(FREEGLUT_INCLUDE_DIR  ${GLUT_INCLUDE_DIR})
 
-IF(NOT FREEGLUT_FOUND)
-   IF (FREEGLUT_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find FREEGLUT")
-   ENDIF (FREEGLUT_FIND_REQUIRED)
-ENDIF(NOT FREEGLUT_FOUND)
+
+    ENDIF(GLUT_glut_LIBRARY)
+  ENDIF(GLUT_INCLUDE_DIR)
+
+  MARK_AS_ADVANCED(
+    GLUT_INCLUDE_DIR
+    GLUT_glut_LIBRARY
+    GLUT_Xmu_LIBRARY
+    GLUT_Xi_LIBRARY
+)
+ELSE(APPLE)
+  IF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)
+     SET(FREEGLUT_FOUND TRUE)
+     SET(FREEGLUT_LIBRARIES ${FREEGLUT_LIBRARY})
+  ENDIF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)
+
+  IF(NOT FREEGLUT_FOUND)
+     IF (FREEGLUT_FIND_REQUIRED)
+        MESSAGE(FATAL_ERROR "Could not find FREEGLUT")
+     ENDIF (FREEGLUT_FIND_REQUIRED)
+  ENDIF(NOT FREEGLUT_FOUND)
+ENDIF(APPLE)
\ No newline at end of file

Reply via email to