From: =?utf-8?q?Timo_R=C3=B6hling?= Date: Sat, 18 Sep 2021 23:01:33 +0200 Subject: Guard copy to cachedir --- cmake/Modules/FindSphinx.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/FindSphinx.cmake b/cmake/Modules/FindSphinx.cmake index 72ee898..f1acca4 100644 --- a/cmake/Modules/FindSphinx.cmake +++ b/cmake/Modules/FindSphinx.cmake @@ -366,7 +366,9 @@ function(sphinx_add_docs _target) set(_cachedir "${CMAKE_CURRENT_BINARY_DIR}/${_target}.cache") file(MAKE_DIRECTORY "${_cachedir}") - file(COPY "${_sourcedir}/_static" DESTINATION "${_cachedir}") + if(EXISTS "${_sourcedir}/_static") + file(COPY "${_sourcedir}/_static" DESTINATION "${_cachedir}") + endif() if(EXISTS "${_sourcedir}/conf.py") configure_file("${_sourcedir}/conf.py" "${_cachedir}/conf.py" @ONLY)