diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in
index d7676a7a72c713b6da4f3fbf8a1ab0e3f447a526..56cdc843409d3d4c5365cc16c51e7c106379d215 100644
--- a/doxygen/Doxyfile.in
+++ b/doxygen/Doxyfile.in
@@ -58,7 +58,7 @@ PROJECT_LOGO           =
 # entered, it will be relative to the location where doxygen was started. If
 # left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = doc
+OUTPUT_DIRECTORY       = @BUILD_DIR@/doc
 
 # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and