diff options
author | Brad King <brad.king@kitware.com> | 2017-02-10 15:41:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-10 15:43:29 (GMT) |
commit | 97917900d146acd55a7e453f477c52cd2e816eb3 (patch) | |
tree | b03b63845be7bf56b5c536e7e5031aa0fd7f1640 /Utilities/Sphinx | |
parent | 971384c28759ad042624bda3893be6fdb1795591 (diff) | |
download | CMake-97917900d146acd55a7e453f477c52cd2e816eb3.zip CMake-97917900d146acd55a7e453f477c52cd2e816eb3.tar.gz CMake-97917900d146acd55a7e453f477c52cd2e816eb3.tar.bz2 |
Utilities/Sphinx: Port qthelp css workaround to Sphinx 1.4
The `default.css` static content is no longer placed in the qthelp
`_static` directory. If it does not exist, skip over it and insert
the content of `basic.css` directly into `cmake.css`.
Diffstat (limited to 'Utilities/Sphinx')
-rw-r--r-- | Utilities/Sphinx/apply_qthelp_css_workaround.cmake | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Utilities/Sphinx/apply_qthelp_css_workaround.cmake b/Utilities/Sphinx/apply_qthelp_css_workaround.cmake index 8b74d12..288f370 100644 --- a/Utilities/Sphinx/apply_qthelp_css_workaround.cmake +++ b/Utilities/Sphinx/apply_qthelp_css_workaround.cmake @@ -1,11 +1,15 @@ file(READ "${CSS_DIR}/basic.css" BasicCssContent) -file(READ "${CSS_DIR}/default.css" DefaultCssContent) -string(REPLACE - "@import url(\"basic.css\")" "${BasicCssContent}" - DefaultCssContent "${DefaultCssContent}" -) +if(EXISTS "${CSS_DIR}/default.css") + file(READ "${CSS_DIR}/default.css" DefaultCssContent) + string(REPLACE + "@import url(\"basic.css\")" "${BasicCssContent}" + DefaultCssContent "${DefaultCssContent}" + ) +else() + set(DefaultCssContent "${BasicCssContent}") +endif() file(READ "${CSS_DIR}/cmake.css" CMakeCssContent) string(REPLACE |