blob: e4ad069b465fb0e33ca1ad750f275375d8aa6fb8 [file] [log] [blame]
Radek Krejcicb293a32020-11-13 15:36:29 +01001# yanglint
2
3set(lintsrc
4 main.c
5 main_ni.c
Radek Krejcie9f13b12020-11-09 17:42:04 +01006 cmd.c
7 cmd_add.c
8 cmd_clear.c
9 cmd_data.c
10 cmd_list.c
11 cmd_load.c
12 cmd_print.c
13 cmd_searchpath.c
14 common.c
Radek Krejcicb293a32020-11-13 15:36:29 +010015 completion.c
16 configuration.c
17 linenoise/linenoise.c)
18
19set(format_sources
20 ${format_sources}
21 ${CMAKE_CURRENT_SOURCE_DIR}/*.c
22 ${CMAKE_CURRENT_SOURCE_DIR}/*.h
23 PARENT_SCOPE)
24
25add_executable(yanglint ${lintsrc} $<TARGET_OBJECTS:compat>)
26target_link_libraries(yanglint yang)
27install(TARGETS yanglint DESTINATION ${CMAKE_INSTALL_BINDIR})
28install(FILES ${PROJECT_SOURCE_DIR}/tools/lint/yanglint.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
29target_include_directories(yanglint BEFORE PRIVATE ${PROJECT_BINARY_DIR})
30