From 018fb451f58ebce0be52af1b5c1c50e50bd5345b Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 26 Jan 2013 09:06:20 +0100 Subject: [PATCH 2/2] Support platform related docbook parts for cmake build system. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59807 --- cmake/doc/CMakeLists.txt | 11 ++++++++--- 1 Datei geändert, 8 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-) diff --git a/cmake/doc/CMakeLists.txt b/cmake/doc/CMakeLists.txt index b29ca28..115d811 100644 --- a/cmake/doc/CMakeLists.txt +++ b/cmake/doc/CMakeLists.txt @@ -37,19 +37,24 @@ if (DBUS_ENABLE_XML_DOCS) macro (DOCBOOK _sources _format) get_filename_component(_infile ${_sources} ABSOLUTE) get_filename_component(_name ${_infile} NAME) + if (UNIX) + set(_profile_os "linux") + elseif (WIN32) + set(_profile_os "win") + endif() if (${_format} STREQUAL "man") string(REPLACE ".xml" "" _outname ${_name}) - set(STYLESHEET "${DOCBOOKXSL_DIR}/manpages/docbook.xsl") + set(STYLESHEET "${DOCBOOKXSL_DIR}/manpages/profile-docbook.xsl") else() string(REPLACE ".xml" ".html" _outname ${_name}) - set(STYLESHEET "${DOCBOOKXSL_DIR}/html/docbook.xsl") + set(STYLESHEET "${DOCBOOKXSL_DIR}/html/profile-docbook.xsl") endif () set(_outfile ${CMAKE_CURRENT_BINARY_DIR}/${_outname}) if (EXISTS ${_sources}) add_custom_target(${_outname} - ${XSLTPROC_EXECUTABLE} --output ${_outfile} --nonet --xinclude --param passivetex.extensions '1' ${STYLESHEET} ${_infile} + ${XSLTPROC_EXECUTABLE} --output ${_outfile} --nonet --xinclude --param passivetex.extensions '1' --stringparam profile.os "\"${_profile_os}\"" ${STYLESHEET} ${_infile} DEPENDS ${_infile} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) -- 1.7.10.4