I am Charmie

メモとログ

CodeSynthesis XSD: CMake

Following the wiki, we should be able to use CodeSynthesis XSD with CMake. What the FindXSD.cmake does is that

  1. call the executable of CodeSynthesis XSD and give an .xsd file, say test.xsd, the executable.
  2. pre-defined function generates a set of .cxx and .hxx files, test.cxx and test.hxx in this case.
  3. add a rule to make a library libtest.a from the generated files.

MACRO and FUNCTION of CMake enable this procedure. Due to some unknown reasons, these FindXSD.cmake files didn't work on my computer. So, I manually generate a set of .cxx and .hxx files and then run cmake to find XercesC and XSD, add a rule to make a library, and make a link to the library.