--- CMakeLists.txt.orig	2013-03-08 18:06:45.000000000 +0000
+++ CMakeLists.txt	2013-03-09 20:13:20.000000000 +0000
@@ -70,6 +70,7 @@
 option(ENABLE_VORO3D "Enable Voro3D" ${DEFAULT})
 option(ENABLE_WRAP_JAVA "Build Java wrappers" OFF)
 option(ENABLE_WRAP_PYTHON "Build Python wrappers" OFF)
+option(INSTALL_DOCS "Install the docs (FreeBSD only)" ON)
 
 set(GMSH_MAJOR_VERSION 2)
 set(GMSH_MINOR_VERSION 7)
@@ -881,7 +885,7 @@
   list(LENGTH OCC_LIBS NUM_OCC_LIBS)
   if(NUM_OCC_LIBS EQUAL NUM_OCC_LIBS_REQUIRED)
     find_path(OCC_INC "BRep_Tool.hxx" PATHS ENV CASROOT PATH_SUFFIXES inc 
-              include include/oce opencascade)
+              include include/oce opencascade OpenCAS/ros/inc)
     if(OCC_INC)
       set_config_option(HAVE_OCC "OpenCascade")
       list(APPEND EXTERNAL_LIBRARIES ${OCC_LIBS})
@@ -1166,7 +1170,7 @@
   else(ENABLE_OS_SPECIFIC_INSTALL)
     set(GMSH_BIN bin)
     set(GMSH_DOC share/doc/gmsh)
-    set(GMSH_MAN share/man/man1)
+    set(GMSH_MAN man/man1)
   endif(ENABLE_OS_SPECIFIC_INSTALL)
   if(CYGWIN)
     unix2dos(GMSH_API)
@@ -1185,7 +1189,7 @@
 else(WIN32 OR CYGWIN)
   set(GMSH_BIN bin)
   set(GMSH_DOC share/doc/gmsh)
-  set(GMSH_MAN share/man/man1)
+  set(GMSH_MAN man/man1)
 endif(WIN32 OR CYGWIN)
 
 # mark targets as optional so we can install them separately if needed
@@ -1198,11 +1202,13 @@
   install(TARGETS shared DESTINATION lib OPTIONAL)
 endif(ENABLE_BUILD_SHARED)
 if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
   install(FILES ${GMSH_API} DESTINATION include/gmsh)
 endif(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
-install(FILES ${WELCOME_FILE} DESTINATION ${GMSH_DOC} RENAME README.txt)
-install(FILES ${LICENSE_FILE} DESTINATION ${GMSH_DOC})
-install(FILES ${CREDITS_FILE} DESTINATION ${GMSH_DOC})
-install(FILES ${TUTORIAL_FILES} DESTINATION ${GMSH_DOC}/tutorial)
-install(FILES ${DEMO_FILES} DESTINATION ${GMSH_DOC}/demos)
+if(INSTALL_DOCS)
+  install(FILES ${WELCOME_FILE} DESTINATION ${GMSH_DOC} RENAME README.txt)
+  install(FILES ${LICENSE_FILE} DESTINATION ${GMSH_DOC})
+  install(FILES ${CREDITS_FILE} DESTINATION ${GMSH_DOC})
+  install(FILES ${TUTORIAL_FILES} DESTINATION ${GMSH_DOC}/tutorial)
+  install(FILES ${DEMO_FILES} DESTINATION ${GMSH_DOC}/demos)
+endif(INSTALL_DOCS)
 if(UNIX AND NOT CYGWIN)
   install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/doc/gmsh.1 DESTINATION ${GMSH_MAN})
 endif(UNIX AND NOT CYGWIN)
