blob: 561fbc5b2da46562e162035de85e5dd714288704 [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001# The dict_legacy_xml extension
2PROJECT("Legacy XML dictionary files support" C)
3
4# Parser files
5BISON_FILE(dict_lxml.y)
6FLEX_FILE(dict_lxml.l)
7SET_SOURCE_FILES_PROPERTIES(lex.dict_lxml.c dict_lxml.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}")
8
9# We use LibXml2 (from GNOME) to parse XML files
10FIND_PACKAGE(LibXml2 REQUIRED)
11
12# List of source files
13SET( DICT_LXML_SRC
14 dict_lxml.c
15 dict_lxml_xml.c
16 dict_lxml.h
17 lex.dict_lxml.c
18 dict_lxml.tab.c
19 dict_lxml.tab.h
20)
21INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
22INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
23
24# Compile these files as a freeDiameter extension
25FD_ADD_EXTENSION(dict_legacy_xml ${DICT_LXML_SRC})
26
27TARGET_LINK_LIBRARIES(dict_legacy_xml ${LIBXML2_LIBRARIES} )
28
29
30####
31## INSTALL section ##
32
33INSTALL(TARGETS dict_legacy_xml
34 LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
35 COMPONENT freeDiameter-dictionary-legacy)