Add one option to generate the PDF from CMake at build time

Make sure pygmentize is installed

Change-Id: I068ba45c33a8e96acc906a464b12d10d58b3e231
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29834d1..117e86b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -583,3 +583,15 @@
 
 ADD_SUBDIRECTORY(internal/ceres)
 ADD_SUBDIRECTORY(examples)
+
+OPTION(BUILD_DOCUMENTATION
+       "Build User's Guide (pdf)"
+       OFF)
+
+IF (${BUILD_DOCUMENTATION})
+  MESSAGE("-- Documentation building is enabled")
+
+  # Generate the User's Guide (pdf).
+  # The corresponding target is UserGuide, but is included in ALL.
+  ADD_SUBDIRECTORY(docs)
+ENDIF (${BUILD_DOCUMENTATION})