blob: 0e1ee17dd205eb3c2ba0aacc6ec02bc4a3543ea1 [file] [log] [blame]
Michal Vasko43634282024-04-02 13:51:45 +02001include(CheckIncludeFile)
2
Radek Krejcicb293a32020-11-13 15:36:29 +01003# config file for tools
4configure_file(${PROJECT_SOURCE_DIR}/tools/config.h.in ${PROJECT_BINARY_DIR}/tools/config.h @ONLY)
5
Michal Vasko43634282024-04-02 13:51:45 +02006# find ioctl
7check_include_file("sys/ioctl.h" HAVE_IOCTL)
8if(NOT HAVE_IOCTL)
9 message(STATUS "Disabling interactive yanglint, sys/ioctl.h not found...")
10 set(ENABLE_YANGLINT_INTERACTIVE OFF)
11endif()
12
13# find getopt library on WIN32
Jan Kundrát3fc7f492021-12-17 16:19:23 +010014if(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át2e3f9352021-12-11 02:16:27 +010018endif()
Radek Krejcicb293a32020-11-13 15:36:29 +010019
Jan Kundrát3fc7f492021-12-17 16:19:23 +010020add_subdirectory(lint)
21add_subdirectory(re)
22
Radek Krejcicb293a32020-11-13 15:36:29 +010023set(format_sources
24 ${format_sources}
25 PARENT_SCOPE)