diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8278522eb7a2b6abc2c46e39e6fec92f2012162..3f853f4dd057a7af68d77f1f4b2ec00e45d8cab0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,6 +113,9 @@ endif()
 set(CUSTOM_DOCDIR "" CACHE STRING "Directory to install documentation into")
 if(NOT CUSTOM_DOCDIR STREQUAL "")
 	set(DOCDIR "${CUSTOM_DOCDIR}")
+	if(NOT RUN_IN_PLACE)
+		set(EXAMPLE_CONF_DIR ${DOCDIR})
+	endif()
 	message(STATUS "Using DOCDIR=${DOCDIR}")
 endif()