CMake linux fixes when using meinproc4 doc generator.
authorRalf Habacker <ralf.habacker@freenet.de>
Thu, 28 Feb 2013 12:22:33 +0000 (12:22 +0000)
committerRalf Habacker <ralf.habacker@freenet.de>
Mon, 4 Mar 2013 17:27:08 +0000 (18:27 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
cmake/doc/CMakeLists.txt

index 15c0540171b8faa27622b52f75aa7683329e1d53..dee9431beeee012ccdc93795b91c3d853f900f6e 100644 (file)
@@ -28,16 +28,19 @@ if (XMLTO_EXECUTABLE)
        set(DBUS_XML_DOCS_ENABLED 1)
        set(MEINPROC4_EXECUTABLE 0)
        MESSAGE(STATUS "xmlto docbook generator found")
+       set(STYLESHEET_MAN "${DOCBOOKXSL_DIR}/manpages/docbook.xsl")
+       set(STYLESHEET_HTML "${DOCBOOKXSL_DIR}/html/docbook.xsl")
+
 elseif (MEINPROC4_EXECUTABLE)
        set(DOCBOOK_GENERATOR_NAME "meinproc4" PARENT_SCOPE)
        set(DBUS_XML_DOCS_ENABLED 1)
        if(WIN32)
                get_filename_component(_a ${MEINPROC4_EXECUTABLE} PATH)
                get_filename_component(_meinproc_install_path ${_a} PATH)
+               set(STYLESHEET_HTML "${_meinproc_install_path}/share/apps/ksgmltools2/docbook/xsl/html/docbook.xsl")
        else(WIN32)
-               set(_meinproc_install_path ${CMAKE_INSTALL_PREFIX})
+               set(STYLESHEET_HTML file:///usr/share/kde4/apps/ksgmltools2/customization/kde-nochunk.xsl)
        endif(WIN32)
-       set(STYLESHEET "${_meinproc_install_path}/share/apps/ksgmltools2/docbook/xsl/html/docbook.xsl")
 endif ()
 
 if (DBUS_ENABLE_XML_DOCS)
@@ -48,10 +51,10 @@ macro (DOCBOOK _sources _format)
 
   if (${_format} STREQUAL "man")
     string(REPLACE ".xml" "" _outname ${_name})
-    set(STYLESHEET "${DOCBOOKXSL_DIR}/manpages/docbook.xsl")
+    set(STYLESHEET ${STYLESHEET_MAN})
   else()
     string(REPLACE ".xml" ".html" _outname ${_name})
-    set(STYLESHEET "${DOCBOOKXSL_DIR}/html/docbook.xsl")
+    set(STYLESHEET ${STYLESHEET_HTML})
   endif ()
 
   set(_outfile ${CMAKE_CURRENT_BINARY_DIR}/${_outname})