build: Fix CMake install for info file.
[ginac.git] / doc / CMakeLists.txt
index fdfc193f551450c89813a637d3d2d8e0608743d5..5f17dc27344a59b146de7b8ba6d855934964cfde 100644 (file)
@@ -26,7 +26,7 @@ macro(add_info_file thename)
        add_custom_target(${thename}_html DEPENDS ${${thename}_HTML})
        add_dependencies(info ${thename}_info)
        add_dependencies(html ${thename}_html)
-       install(FILES ${${thename}_INFO} DESTINATION "${SHARE_INSTALL_PREFIX}/info")
+       install(FILES ${${thename}_INFO} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/info")
 endmacro()
 
 macro(pdflatex_process texfile)
@@ -35,6 +35,7 @@ macro(pdflatex_process texfile)
        set(_idx ${_dirname}/${_basename}.idx)
        set(_ind ${_dirname}/${_basename}.ind)
        set(_pdf ${_dirname}/${_basename}.pdf)
+       set(_fixupind ${CMAKE_SOURCE_DIR}/scripts/fixupind.py)
        add_custom_command(
                OUTPUT ${_idx}
                COMMAND ${PDFLATEX_COMPILER} ${texfile}
@@ -44,6 +45,7 @@ macro(pdflatex_process texfile)
        add_custom_command(
                OUTPUT ${_ind}
                COMMAND ${MAKEINDEX_COMPILER} ${_idx}
+               COMMAND ${PYTHON} ${_fixupind} ${_idx}
                WORKING_DIRECTORY ${_dirname}
                DEPENDS ${texfile} ${_idx}
                COMMENT "MAKEINDEX ${_basename}.idx")