Michal Vasko | 4363428 | 2024-04-02 13:51:45 +0200 | [diff] [blame^] | 1 | include(CheckIncludeFile) |
| 2 | |
Radek Krejci | cb293a3 | 2020-11-13 15:36:29 +0100 | [diff] [blame] | 3 | # config file for tools |
| 4 | configure_file(${PROJECT_SOURCE_DIR}/tools/config.h.in ${PROJECT_BINARY_DIR}/tools/config.h @ONLY) |
| 5 | |
Michal Vasko | 4363428 | 2024-04-02 13:51:45 +0200 | [diff] [blame^] | 6 | # find ioctl |
| 7 | check_include_file("sys/ioctl.h" HAVE_IOCTL) |
| 8 | if(NOT HAVE_IOCTL) |
| 9 | message(STATUS "Disabling interactive yanglint, sys/ioctl.h not found...") |
| 10 | set(ENABLE_YANGLINT_INTERACTIVE OFF) |
| 11 | endif() |
| 12 | |
| 13 | # find getopt library on WIN32 |
Jan Kundrát | 3fc7f49 | 2021-12-17 16:19:23 +0100 | [diff] [blame] | 14 | if(WIN32) |
| 15 | find_library(GETOPT_LIBRARY NAMES getopt REQUIRED) |
| 16 | find_path(GETOPT_INCLUDE_DIR NAMES getopt.h REQUIRED) |
| 17 | message(STATUS "Found <getopt.h> at ${GETOPT_INCLUDE_DIR}, library at ${GETOPT_LIBRARY}") |
Jan Kundrát | 2e3f935 | 2021-12-11 02:16:27 +0100 | [diff] [blame] | 18 | endif() |
Radek Krejci | cb293a3 | 2020-11-13 15:36:29 +0100 | [diff] [blame] | 19 | |
Jan Kundrát | 3fc7f49 | 2021-12-17 16:19:23 +0100 | [diff] [blame] | 20 | add_subdirectory(lint) |
| 21 | add_subdirectory(re) |
| 22 | |
Radek Krejci | cb293a3 | 2020-11-13 15:36:29 +0100 | [diff] [blame] | 23 | set(format_sources |
| 24 | ${format_sources} |
| 25 | PARENT_SCOPE) |