File: CMakeLists.txt

package info (click to toggle)
syslog-ng 3.19.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,176 kB
  • sloc: ansic: 114,472; makefile: 4,697; sh: 4,391; python: 4,282; java: 4,047; xml: 2,435; yacc: 1,108; lex: 426; perl: 193; awk: 184
file content (36 lines) | stat: -rw-r--r-- 780 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
set(xml_HEADERS
    "xml-parser.h"
    "xml.h"
    "${CMAKE_CURRENT_BINARY_DIR}/xml-grammar.h"
)

set(xml_SOURCES
    "xml-plugin.c"
    "xml-parser.c"
    "xml.c"
    "${CMAKE_CURRENT_BINARY_DIR}/xml-grammar.c"
)

generate_y_from_ym(modules/xml/xml-grammar)

bison_target(xmlGrammar
    ${CMAKE_CURRENT_BINARY_DIR}/xml-grammar.y
    ${CMAKE_CURRENT_BINARY_DIR}/xml-grammar.c
COMPILE_FLAGS ${BISON_FLAGS})

option(ENABLE_XML "Enable xml" ON)

if (ENABLE_XML)
  add_library(xml SHARED ${xml_SOURCES})
  target_include_directories(xml
    PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
    PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
  )
  target_link_libraries(xml PRIVATE syslog-ng)

  install(TARGETS xml
  LIBRARY DESTINATION lib/syslog-ng/
  COMPONENT xml)

  add_test_subdirectory(tests)
endif()