diff options
author | Adrian Kummerländer | 2014-04-18 13:50:57 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-04-18 13:50:57 +0200 |
commit | e886ac3a4f2dacc79cf174b1257146fd91bf6b7c (patch) | |
tree | bbb85fe0b889e4b979e5c1cdffda473508c4f236 | |
parent | f2e8939180d42b9f233b326c9dea34a02fcf9859 (diff) | |
download | InputXSLT-e886ac3a4f2dacc79cf174b1257146fd91bf6b7c.tar InputXSLT-e886ac3a4f2dacc79cf174b1257146fd91bf6b7c.tar.gz InputXSLT-e886ac3a4f2dacc79cf174b1257146fd91bf6b7c.tar.bz2 InputXSLT-e886ac3a4f2dacc79cf174b1257146fd91bf6b7c.tar.lz InputXSLT-e886ac3a4f2dacc79cf174b1257146fd91bf6b7c.tar.xz InputXSLT-e886ac3a4f2dacc79cf174b1257146fd91bf6b7c.tar.zst InputXSLT-e886ac3a4f2dacc79cf174b1257146fd91bf6b7c.zip |
Added cmake build instructions
* changed relative paths of input files to accomodate builds inside a separate directory
-rw-r--r-- | CMakeLists.txt | 22 | ||||
-rw-r--r-- | dummy/transform.xsl | 2 | ||||
-rw-r--r-- | test.cc | 6 |
3 files changed, 26 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e98ef8a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 2.8) +project(InputXSLT) + +set( + CMAKE_CXX_FLAGS + "-std=c++11 -W -Wall -Wextra -Winline -pedantic" +) + +include_directories( + src/ +) + +add_executable( + test + test.cc +) + +target_link_libraries( + test + xalan-c + xerces-c +) diff --git a/dummy/transform.xsl b/dummy/transform.xsl index dca15a1..bd7cbc7 100644 --- a/dummy/transform.xsl +++ b/dummy/transform.xsl @@ -22,7 +22,7 @@ <xsl:template match="items/item"> <div id="{.}"> - <xsl:value-of select="external:read-file('dummy/test.txt')" /> + <xsl:value-of select="external:read-file('../dummy/test.txt')" /> </div> </xsl:template> @@ -21,9 +21,9 @@ int main() { FunctionFileRead() ); - xalan::XSLTInputSource input("dummy/in.xml"); - xalan::XSLTInputSource tranformation("dummy/transform.xsl"); - xalan::XSLTResultTarget output("dummy/out.xml"); + xalan::XSLTInputSource input("../dummy/in.xml"); + xalan::XSLTInputSource tranformation("../dummy/transform.xsl"); + xalan::XSLTResultTarget output("out.xml"); int result(transformer.transform( input, |