<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>This site works best in a real browser - CMake</title>
    <link>http://grahamcox.co.uk/serendipity/</link>
    <description>My little place on the web...</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.3 - http://www.s9y.org/</generator>
    <pubDate>Fri, 07 Nov 2008 13:14:38 GMT</pubDate>

    <image>
        <url>http://grahamcox.co.uk/serendipity/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: This site works best in a real browser - CMake - My little place on the web...</title>
        <link>http://grahamcox.co.uk/serendipity/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>CMake code to support asciidoc</title>
    <link>http://grahamcox.co.uk/serendipity/index.php?/archives/36-CMake-code-to-support-asciidoc.html</link>
            <category>CMake</category>
    
    <comments>http://grahamcox.co.uk/serendipity/index.php?/archives/36-CMake-code-to-support-asciidoc.html#comments</comments>
    <wfw:comment>http://grahamcox.co.uk/serendipity/wfwcomment.php?cid=36</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://grahamcox.co.uk/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=36</wfw:commentRss>
    

    <author>nospam@example.com (Graham Cox)</author>
    <content:encoded>
    Asciidoc is a really useful and sensible way of allowing people to write documentation, in that the plain text source code is nearly as readable as the generated output. The following is a CMake file to allow for conversion of text input files into asciidoc generated output files&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
PROJECT(Document)&lt;br /&gt;
FIND_PACKAGE(Asciidoc)&lt;br /&gt;
IF(ASCIIDOC_FOUND)&lt;br /&gt;
  FILE(GLOB _docfiles *.txt)&lt;br /&gt;
&lt;br /&gt;
  FOREACH(_file ${_docfiles})&lt;br /&gt;
    GET_FILENAME_COMPONENT(_file_we ${_file} NAME_WE)&lt;br /&gt;
    SET(_in &quot;${_file_we}&quot;)&lt;br /&gt;
    SET(_out &quot;${_file_we}.html&quot;)&lt;br /&gt;
    IF (NOT &quot;${_in}&quot; STREQUAL &quot;CMakeLists&quot;)&lt;br /&gt;
        ADD_CUSTOM_COMMAND(&lt;br /&gt;
            OUTPUT    &quot;${_out}&quot;&lt;br /&gt;
            COMMAND   ${ASCIIDOC_EXECUTABLE} -a toc -o ${_out} ${_file}&lt;br /&gt;
            DEPENDS   ${_file}&lt;br /&gt;
            COMMENT   &quot;Asciidoc ${_in}&quot;&lt;br /&gt;
        )&lt;br /&gt;
        ADD_CUSTOM_TARGET(${_in} ALL echo&lt;br /&gt;
          DEPENDS   &quot;${_out}&quot;&lt;br /&gt;
        )&lt;br /&gt;
    ENDIF (NOT &quot;${_in}&quot; STREQUAL &quot;CMakeLists&quot;)&lt;br /&gt;
&lt;br /&gt;
  ENDFOREACH(_file)&lt;br /&gt;
ENDIF(ASCIIDOC_FOUND)&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
And it needs the following FindAsciidoc.cmake file available&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
# - Find Asciidoc&lt;br /&gt;
# this module looks for asciidoc&lt;br /&gt;
#&lt;br /&gt;
#  ASCIIDOC_EXECUTABLE - the full path to asciidoc&lt;br /&gt;
#  ASCIIDOC_FOUND      - If false, don&#039;t attempt to use asciidoc.&lt;br /&gt;
&lt;br /&gt;
FIND_PROGRAM(ASCIIDOC_EXECUTABLE&lt;br /&gt;
  asciidoc&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
MARK_AS_ADVANCED(&lt;br /&gt;
  ASCIIDOC_EXECUTABLE&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
IF (NOT ASCIIDOC_EXECUTABLE)&lt;br /&gt;
  SET(ASCIIDOC_FOUND &quot;NO&quot;)&lt;br /&gt;
ELSE (NOT ASCIIDOC_EXECUTABLE)&lt;br /&gt;
  SET(ASCIIDOC_FOUND &quot;YES&quot;)&lt;br /&gt;
ENDIF (NOT ASCIIDOC_EXECUTABLE)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
IF (NOT ASCIIDOC_FOUND AND Asciidoc_FIND_REQUIRED)&lt;br /&gt;
   MESSAGE(FATAL_ERROR &quot;Could not find asciidoc&quot;)&lt;br /&gt;
ENDIF (NOT ASCIIDOC_FOUND AND Asciidoc_FIND_REQUIRED)&lt;br /&gt;
&lt;/code&gt; 
    </content:encoded>

    <pubDate>Fri, 07 Nov 2008 13:14:38 +0000</pubDate>
    <guid isPermaLink="false">http://grahamcox.co.uk/serendipity/index.php?/archives/36-guid.html</guid>
    
</item>

</channel>
</rss>