--- CMakeLists.txt.orig	2011-01-17 19:38:13.000000000 +0800
+++ CMakeLists.txt	2011-03-01 19:52:50.000000000 +0800
@@ -343,7 +344,9 @@
     PATTERN "*.in" EXCLUDE)
 install(DIRECTORY ${SOURCE_DIR}/themes DESTINATION ${AWESOME_DATA_PATH}
     PATTERN "*.in" EXCLUDE)
-install(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_DOC_PATH})
+if(INSTALL_PORTDOCS)
+    install(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_DOC_PATH})
+endif()
 install(FILES "awesome.desktop" DESTINATION ${AWESOME_XSESSION_PATH})
 if(GENERATE_LUADOC)
     install(DIRECTORY ${BUILD_DIR}/luadoc DESTINATION ${AWESOME_DOC_PATH})
