Merge topic 'workaround-qt4-assistant'

3a572290 Help: Workaround Qt 4.8 assistant bug in CSS handling.
This commit is contained in:
Brad King 2014-04-03 12:51:38 -04:00 committed by CMake Topic Stage
commit 6314188362
2 changed files with 19 additions and 0 deletions

View File

@ -75,6 +75,10 @@ if(SPHINX_QTHELP)
list(APPEND doc_formats qthelp) list(APPEND doc_formats qthelp)
set(qthelp_extra_commands 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 COMMAND qcollectiongenerator ${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake.qhcp
) )
endif() endif()

View File

@ -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}")