--- CMakeLists.txt.orig	2014-07-09 09:27:58.000000000 +0200
+++ CMakeLists.txt	2014-11-17 23:45:13.000000000 +0100
@@ -89,6 +89,7 @@
 opt(VORO3D "Enable Voro3D (for hex meshing, experimental)" ${DEFAULT})
 opt(WRAP_JAVA "Enable generation of Java wrappers (experimental)" OFF)
 opt(WRAP_PYTHON "Enable generation of Python wrappers" OFF)
+opt(INSTALL_DOCS "Install the docs (FreeBSD only)" ON)
 
 set(GMSH_MAJOR_VERSION 2)
 set(GMSH_MINOR_VERSION 8)
@@ -1450,7 +1451,7 @@
     set(GMSH_BIN bin)
     set(GMSH_LIB lib)
     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)
@@ -1471,7 +1472,7 @@
   set(GMSH_BIN bin)
   set(GMSH_LIB lib)
   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
@@ -1524,11 +1525,13 @@
 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(ENABLE_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(ENABLE_INSTALL_DOCS)
 if(UNIX AND NOT CYGWIN)
   install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/doc/gmsh.1 DESTINATION ${GMSH_MAN})
 endif(UNIX AND NOT CYGWIN)
