-
Notifications
You must be signed in to change notification settings - Fork 18
/
CMakeLists.txt
53 lines (44 loc) · 1.22 KB
/
CMakeLists.txt
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
# telekom / sysrepo-plugin-system
#
# This program is made available under the terms of the
# BSD 3-Clause license which is available at
# https://opensource.org/licenses/BSD-3-Clause
#
# SPDX-FileCopyrightText: 2022 Deutsche Telekom AG
# SPDX-FileContributor: Sartura Ltd.
#
# SPDX-License-Identifier: BSD-3-Clause
#
cmake_minimum_required(VERSION 3.0)
project(sysrepo-interfaces-plugins C)
include(CompileOptions.cmake)
set(PLUGIN 0 CACHE BOOL "Build a plugin")
include_directories(
${CMAKE_SOURCE_DIR}/src/
${CMAKE_SOURCE_DIR}/deps/uthash/include/
)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules")
find_package(SYSREPO REQUIRED)
find_package(LIBYANG REQUIRED)
find_package(SRPC REQUIRED)
find_package(NL REQUIRED)
include_directories(
${SYSREPO_INCLUDE_DIRS}
${LIBYANG_INCLUDE_DIRS}
${SRPC_INCLUDE_DIRS}
${NL_INCLUDE_DIRS}
)
option(INTERFACES_PLUGIN "Enable interfaces plugin" OFF)
option(ROUTING_PLUGIN "Enable interfaces plugin" OFF)
if(INTERFACES_PLUGIN)
add_subdirectory(src/interfaces)
endif()
if(ROUTING_PLUGIN)
add_subdirectory(src/routing)
endif()
if(ENABLE_BUILD_TESTS)
find_package(CMOCKA REQUIRED)
include(CTest)
include(tests/Tests.cmake)
endif()