diff --git a/cmake/BornAgain/PythonDocs.cmake b/cmake/BornAgain/PythonDocs.cmake
index 306b37c3ee55bd27a373fc9637addb8276a89b65..4d880d703c78a39e5e78bd33b45fd8bf253effc4 100644
--- a/cmake/BornAgain/PythonDocs.cmake
+++ b/cmake/BornAgain/PythonDocs.cmake
@@ -12,8 +12,8 @@ function(GeneratePythonDocs PD_TARGET SWIG_DIR)
             )
         add_custom_command(
             OUTPUT ${PD_TARGET}
-            COMMAND ${Python3_EXECUTABLE} ${SWIG_DIR}/doxy2swig.py
-            ${TMP_DIR}/xml/index.xml ${PD_TARGET}
+            COMMAND ${Python3_EXECUTABLE}
+                       ${SWIG_DIR}/doxy2swig.py ${TMP_DIR}/xml/index.xml ${PD_TARGET}
             DEPENDS ${TMP_DIR}/xml/index.xml
             )