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 (37 lines) | stat: -rw-r--r-- 1,114 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
37
set(snmptrapd_parser_HEADERS
    "snmptrapd-parser-parser.h"
    "${CMAKE_CURRENT_BINARY_DIR}/snmptrapd-parser-grammar.h"
)

set(SNMPTRAPD_PARSER_SOURCES
    "snmptrapd-parser-plugin.c"
    "snmptrapd-parser-parser.c"
    "snmptrapd-header-parser.c"
    "snmptrapd-parser.c"
    "varbindlist-scanner.c"
    "${CMAKE_CURRENT_BINARY_DIR}/snmptrapd-parser-grammar.c"
)

generate_y_from_ym(modules/snmptrapd-parser/snmptrapd-parser-grammar)

bison_target(snmptrapd-parserGrammar
    ${CMAKE_CURRENT_BINARY_DIR}/snmptrapd-parser-grammar.y
    ${CMAKE_CURRENT_BINARY_DIR}/snmptrapd-parser-grammar.c
COMPILE_FLAGS ${BISON_FLAGS})

option(ENABLE_SNMPTRAPD_PARSER "Enable snmptrapd-parser" ON)

if (ENABLE_SNMPTRAPD_PARSER)
  add_library(snmptrapd_parser SHARED ${SNMPTRAPD_PARSER_SOURCES})
  target_include_directories(snmptrapd_parser
    PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
    PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
  )
  target_link_libraries(snmptrapd_parser PRIVATE syslog-ng)

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

  add_test_subdirectory(tests)
endif()