diff options
author | Brad King <brad.king@kitware.com> | 2014-04-03 16:51:38 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-03 16:51:38 (GMT) |
commit | 63141883628a5eef6e992edba46d1732d17888ea (patch) | |
tree | e9009d67a090f1bc022460ecb7341ca6aac74afd | |
parent | 487f7a41ecd0df31c196b56085d32f44249515db (diff) | |
parent | 3a572290cc606039bae210309eefe82cfde85e54 (diff) | |
download | CMake-63141883628a5eef6e992edba46d1732d17888ea.zip CMake-63141883628a5eef6e992edba46d1732d17888ea.tar.gz CMake-63141883628a5eef6e992edba46d1732d17888ea.tar.bz2 |
Merge topic 'workaround-qt4-assistant'
3a572290 Help: Workaround Qt 4.8 assistant bug in CSS handling.
-rw-r--r-- | Utilities/Sphinx/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Utilities/Sphinx/apply_qthelp_css_workaround.cmake | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index 51c83ba..4ae4bec 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -75,6 +75,10 @@ if(SPHINX_QTHELP) list(APPEND doc_formats qthelp) set(qthelp_extra_commands + # Workaround for assistant prior to + # https://codereview.qt-project.org/#change,82250 in Qt 4. + COMMAND ${CMAKE_COMMAND} "-DCSS_DIR=${CMAKE_CURRENT_BINARY_DIR}/qthelp/_static" + -P "${CMAKE_CURRENT_SOURCE_DIR}/apply_qthelp_css_workaround.cmake" COMMAND qcollectiongenerator ${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake.qhcp ) endif() diff --git a/Utilities/Sphinx/apply_qthelp_css_workaround.cmake b/Utilities/Sphinx/apply_qthelp_css_workaround.cmake new file mode 100644 index 0000000..8b74d12 --- /dev/null +++ b/Utilities/Sphinx/apply_qthelp_css_workaround.cmake @@ -0,0 +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}" +) + +file(READ "${CSS_DIR}/cmake.css" CMakeCssContent) +string(REPLACE + "@import url(\"default.css\")" "${DefaultCssContent}" + CMakeCssContent "${CMakeCssContent}" +) +file(WRITE "${CSS_DIR}/cmake.css" "${CMakeCssContent}") |