[CMake] Problems with ";" turning into spaces in add_command
Dixon, Shane
Shane.Dixon at atmel.com
Tue Sep 29 18:16:17 EDT 2009
I'm trying to get Docbook working in Windows XP with saxon 6.5. I can get almost all the way to the last step and the command dies. At the bottom of this e-mail is the relevant code. Here is what the message() call prints:
C:\WINDOWS\system32\java.exe -cp :C:/opt/saxon6-5-5/saxon.jar:C:/opt/docbook-xsl-saxon-1.00/docbook-xsl-saxon_1.00.jar com.icl.saxon.StyleSheet C:/workspace/MyProj/docs/MyProj.xml http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl
Apparently the java.exe needs -cp options to be separated by ";" instead of ":". If I change this in the FindXslt.cmake, then for some reason by the time it's output from add_command, the ";" shows as a space. I can't seem to escape the ";" character so it prints correctly.
--
Shane
====== from FindXslt.cmake ===========
if ( SAXON )
set ( Xslt_SAXON_CLASSPATH "${Xslt_CLASSPATH}:${SAXON}" )
if ( Xslt_SAXON_EXTENSIONS )
set ( Xslt_SAXON_CLASSPATH "${Xslt_SAXON_CLASSPATH}:${Xslt_SAXON_EXTENSIONS}" )
endif ( Xslt_SAXON_EXTENSIONS )
set ( XSLT_SAXON_COMMAND
${JAVA_RUNTIME} -cp "${Xslt_SAXON_CLASSPATH}" com.icl.saxon.StyleSheet
)
message(STATUS "XSLT_SAXON_COMMAND = ${XSLT_SAXON_COMMAND}")
if ( JAVA_RESOLVER_LIBRARY )
list ( APPEND XSLT_SAXON_COMMAND
-x org.apache.xml.resolver.tools.ResolvingXMLReader
-y org.apache.xml.resolver.tools.ResolvingXMLReader
-u
)
if ( JAVA_PROPERTIES_CATALOGMANAGER )
list ( APPEND XSLT_SAXON_COMMAND
-r org.apache.xml.resolver.tools.CatalogResolver
)
endif ( JAVA_PROPERTIES_CATALOGMANAGER )
endif ( JAVA_RESOLVER_LIBRARY )
endif ( SAXON )
===== from UseXslt.cmake ==========
add_custom_command (
OUTPUT ${ARGN}
COMMAND ${XSL_TRANSFORM_COMMAND}
DEPENDS "${infile}"
VERBATIM
)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090929/469c3b8d/attachment-0001.htm>
More information about the CMake
mailing list