--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -771,13 +771,13 @@ WARN_LOGFILE           =
 # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = ../README.md \
-                         ../include/srtp.h \
-                         ../crypto/include/auth.h \
-                         ../crypto/include/cipher.h \
-                         ../crypto/include/crypto_types.h \
-                         ../crypto/include/err.h \
-                         crypto_kernel.txt
+INPUT                  = @TOP_SRCDIR@/README.md \
+                         @TOP_SRCDIR@/include/srtp.h \
+                         @TOP_SRCDIR@/crypto/include/auth.h \
+                         @TOP_SRCDIR@/crypto/include/cipher.h \
+                         @TOP_SRCDIR@/crypto/include/crypto_types.h \
+                         @TOP_SRCDIR@/crypto/include/err.h \
+                         @TOP_SRCDIR@/doc/crypto_kernel.txt
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1104,7 +1104,7 @@ HTML_FOOTER            =
 # obsolete.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_STYLESHEET        = docs.css
+HTML_STYLESHEET        = @TOP_SRCDIR@/doc/docs.css
 
 # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
 # cascading style sheets that are included after the standard style sheets
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -8,6 +8,7 @@ endif
 
 doc_config = configuration_data()
 doc_config.set('LIBSRTPVERSIONNUMBER', meson.project_version())
+doc_config.set('TOP_SRCDIR', meson.source_root())
 
 doxyfile = configure_file(input: 'Doxyfile.in',
   output: 'Doxyfile',
