summaryrefslogtreecommitdiff
path: root/Utilities/Sphinx/fixup_qthelp_names.cmake
blob: e35ef25bef698e5cb68e6bd773f8d36e8d1cb82b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

file(READ "${QTHELP_DIR}/CMake.qhcp" QHCP_CONTENT)

string(REPLACE
  "<homePage>qthelp://org.sphinx.cmake" "<homePage>qthelp://org.cmake"
  QHCP_CONTENT "${QHCP_CONTENT}"
)
string(REPLACE
  "<startPage>qthelp://org.sphinx.cmake" "<startPage>qthelp://org.cmake"
  QHCP_CONTENT "${QHCP_CONTENT}"
)

string(REPLACE
  "<output>CMake.qch" "<output>CMake-${CMake_VERSION}.qch"
  QHCP_CONTENT "${QHCP_CONTENT}"
)
string(REPLACE
  "<file>CMake.qch" "<file>CMake-${CMake_VERSION}.qch"
  QHCP_CONTENT "${QHCP_CONTENT}"
)

file(WRITE "${QTHELP_DIR}/CMake.qhcp" "${QHCP_CONTENT}")


file(READ "${QTHELP_DIR}/CMake.qhp" QHP_CONTENT)

string(REPLACE
  "<namespace>org.sphinx.cmake" "<namespace>org.cmake"
  QHP_CONTENT "${QHP_CONTENT}"
)

file(WRITE "${QTHELP_DIR}/CMake.qhp" "${QHP_CONTENT}")