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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s