diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-23 09:41:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-23 09:41:28 +0000 |
commit | 76ffd5ce84e4adb412833c8186fc6b26b656947f (patch) | |
tree | 11da7c12c05e9d2a85ec40022d43a970184bb867 /tools/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | libyang3-76ffd5ce84e4adb412833c8186fc6b26b656947f.tar.xz libyang3-76ffd5ce84e4adb412833c8186fc6b26b656947f.zip |
Adding upstream version 3.1.0.upstream/3.1.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/CMakeLists.txt')
-rw-r--r-- | tools/CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 0000000..0e1ee17 --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,25 @@ +include(CheckIncludeFile) + +# config file for tools +configure_file(${PROJECT_SOURCE_DIR}/tools/config.h.in ${PROJECT_BINARY_DIR}/tools/config.h @ONLY) + +# find ioctl +check_include_file("sys/ioctl.h" HAVE_IOCTL) +if(NOT HAVE_IOCTL) + message(STATUS "Disabling interactive yanglint, sys/ioctl.h not found...") + set(ENABLE_YANGLINT_INTERACTIVE OFF) +endif() + +# find getopt library on WIN32 +if(WIN32) + find_library(GETOPT_LIBRARY NAMES getopt REQUIRED) + find_path(GETOPT_INCLUDE_DIR NAMES getopt.h REQUIRED) + message(STATUS "Found <getopt.h> at ${GETOPT_INCLUDE_DIR}, library at ${GETOPT_LIBRARY}") +endif() + +add_subdirectory(lint) +add_subdirectory(re) + +set(format_sources + ${format_sources} + PARENT_SCOPE) |