Brian Waters | 13d9601 | 2017-12-08 16:53:31 -0600 | [diff] [blame^] | 1 | # The dict_legacy_xml extension |
| 2 | PROJECT("Legacy XML dictionary files support" C) |
| 3 | |
| 4 | # Parser files |
| 5 | BISON_FILE(dict_lxml.y) |
| 6 | FLEX_FILE(dict_lxml.l) |
| 7 | SET_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 |
| 10 | FIND_PACKAGE(LibXml2 REQUIRED) |
| 11 | |
| 12 | # List of source files |
| 13 | SET( 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 | ) |
| 21 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) |
| 22 | INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) |
| 23 | |
| 24 | # Compile these files as a freeDiameter extension |
| 25 | FD_ADD_EXTENSION(dict_legacy_xml ${DICT_LXML_SRC}) |
| 26 | |
| 27 | TARGET_LINK_LIBRARIES(dict_legacy_xml ${LIBXML2_LIBRARIES} ) |
| 28 | |
| 29 | |
| 30 | #### |
| 31 | ## INSTALL section ## |
| 32 | |
| 33 | INSTALL(TARGETS dict_legacy_xml |
| 34 | LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} |
| 35 | COMPONENT freeDiameter-dictionary-legacy) |