summaryrefslogtreecommitdiffstats
path: root/Tests/FindLibXslt/Test/libxslt.c
blob: 5b3d7661c08e418b260b78ef9dc85a08d1a0c155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/xsltconfig.h>
#include <stdio.h>
#include <string.h>

int main()
{
  xsltInit();

  xsltStylesheet* style = xsltNewStylesheet();
  xsltFreeStylesheet(style);

  if (0 != strcmp(CMAKE_EXPECTED_LibXslt_VERSION, LIBXSLT_DOTTED_VERSION)) {
    printf("CMAKE_EXPECTED_LibXslt_VERSION: '%s'\n",
           CMAKE_EXPECTED_LibXslt_VERSION);
    printf("LIBXSLT_DOTTED_VERSION: '%s'\n", LIBXSLT_DOTTED_VERSION);
    return 1;
  }

  xsltCleanupGlobals();

  return 0;
}