diff -urN cmake-2.8.4/Modules/FindGLUT.cmake cmake-2.8.4-haiku/Modules/FindGLUT.cmake
--- cmake-2.8.4/Modules/FindGLUT.cmake	2011-02-15 17:47:27.017301504 +0000
+++ cmake-2.8.4-haiku/Modules/FindGLUT.cmake	2011-04-26 07:50:24.890241024 +0000
@@ -46,12 +46,14 @@
       /usr/openwin/include
       /opt/graphics/OpenGL/include
       /opt/graphics/OpenGL/contrib/libglut
+      /boot/develop/headers/os/opengl
       )
   
     FIND_LIBRARY( GLUT_glut_LIBRARY glut
       /usr/openwin/lib
+      /boot/develop/lib/x86/
       )
-    
+    IF(NOT BEOS)
     FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
       /usr/openwin/lib
       )
@@ -59,7 +61,7 @@
     FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
       /usr/openwin/lib
       )
-    
+    ENDIF(NOT BEOS)
   ENDIF (APPLE)
   
 ENDIF (WIN32)
@@ -69,12 +71,18 @@
   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.
+    IF(BEOS)
+    SET( GLUT_LIBRARIES
+      ${GLUT_glut_LIBRARY}
+      )
+    ELSE(BEOS)
     SET( GLUT_LIBRARIES
       ${GLUT_glut_LIBRARY}
       ${GLUT_Xmu_LIBRARY}
       ${GLUT_Xi_LIBRARY} 
       ${GLUT_cocoa_LIBRARY}
       )
+    ENDIF(BEOS)
     SET( GLUT_FOUND "YES" )
     
     #The following deprecated settings are for backwards compatibility with CMake1.4
@@ -84,9 +92,16 @@
   ENDIF(GLUT_glut_LIBRARY)
 ENDIF(GLUT_INCLUDE_DIR)
 
+IF(BEOS)
+MARK_AS_ADVANCED(
+  GLUT_INCLUDE_DIR
+  GLUT_glut_LIBRARY
+  )
+ELSE(BEOS)
 MARK_AS_ADVANCED(
   GLUT_INCLUDE_DIR
   GLUT_glut_LIBRARY
   GLUT_Xmu_LIBRARY
   GLUT_Xi_LIBRARY
   )
+ENDIF(BEOS)
diff -urN cmake-2.8.4/Modules/FindLua51.cmake cmake-2.8.4-haiku/Modules/FindLua51.cmake
--- cmake-2.8.4/Modules/FindLua51.cmake	2011-02-15 17:47:27.019660800 +0000
+++ cmake-2.8.4-haiku/Modules/FindLua51.cmake	2011-04-26 07:50:24.944504832 +0000
@@ -57,13 +57,13 @@
 
 IF(LUA_LIBRARY)
   # include the math library for Unix
-  IF(UNIX AND NOT APPLE)
+  IF(UNIX AND NOT APPLE AND NOT BEOS)
     FIND_LIBRARY(LUA_MATH_LIBRARY m)
     SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
   # For Windows and Mac, don't need to explicitly include the math library
   ELSE(UNIX AND NOT APPLE)
     SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
-  ENDIF(UNIX AND NOT APPLE)
+  ENDIF(UNIX AND NOT APPLE AND NOT BEOS)
 ENDIF(LUA_LIBRARY)
 
 INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
diff -urN cmake-2.8.4/Modules/FindOpenGL.cmake cmake-2.8.4-haiku/Modules/FindOpenGL.cmake
--- cmake-2.8.4/Modules/FindOpenGL.cmake	2011-02-15 17:47:27.020447232 +0000
+++ cmake-2.8.4-haiku/Modules/FindOpenGL.cmake	2011-04-26 07:50:25.026214400 +0000
@@ -80,6 +80,7 @@
       /usr/share/doc/NVIDIA_GLX-1.0/include
       /usr/openwin/share/include
       /opt/graphics/OpenGL/include /usr/X11R6/include
+      /boot/develop/headers/os/opengl
     )
 
     FIND_PATH(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
@@ -94,6 +95,7 @@
             /usr/openwin/lib
             /usr/shlib /usr/X11R6/lib
             ${HPUX_IA_OPENGL_LIB_PATH}
+            /boot/develop/lib/x86/
     )
 
     # On Unix OpenGL most certainly always requires X11.
diff -urN cmake-2.8.4/bootstrap cmake-2.8.4-haiku/bootstrap
--- cmake-2.8.4/bootstrap	2011-02-15 17:47:26.054001664 +0000
+++ cmake-2.8.4-haiku/bootstrap	2011-04-26 07:50:25.222035968 +0000
@@ -142,7 +142,9 @@
     cmake_default_prefix="c:/Program Files/CMake"
   fi
 elif ${cmake_system_haiku}; then
-  cmake_default_prefix=`/bin/finddir B_COMMON_DIRECTORY`
+  cmake_default_prefix=`finddir B_COMMON_DIRECTORY`
+  cmake_man_dir="/documentation/man"
+  cmake_doc_dir="/documentation/doc/cmake-${cmake_version}"
 else
   cmake_default_prefix="/usr/local"
 fi
