generated from telekom/reuse-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
65 lines (54 loc) · 1.79 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
54
55
56
57
58
59
60
61
62
63
64
65
#
# telekom / sysrepo-plugins
#
# 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: 2025 Deutsche Telekom AG
# SPDX-FileContributor: Sartura d.d.
#
# SPDX-License-Identifier: BSD-3-Clause
#
cmake_minimum_required(VERSION 3.0)
project(sysrepo-plugins)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules")
set(SYSREPO_PLUGINS_MAJOR_VERSION 0)
set(SYSREPO_PLUGINS_MINOR_VERSION 1)
set(SYSREPO_PLUGINS_MICRO_VERSION 3)
set(SYSREPO_PLUGINS_VERSION ${SYSREPO_PLUGINS_MAJOR_VERSION}.${SYSREPO_PLUGINS_MINOR_VERSION}.${SYSREPO_PLUGINS_MICRO_VERSION})
option(BUILD_SYSTEM_PLUGIN "Build the ietf-system-plugin" ON)
option(BUILD_INTERFACES_PLUGIN "Build the ietf-interfaces-plugin" ON)
option(BUILD_ROUTING_PLUGIN "Build the ietf-routing-plugin" ON)
option(BUILD_BRIDGING_PLUGIN "Build the ieee802-dot1q-bridge-plugin" ON)
option(BUILD_ACL_PLUGIN "Build the ietf-access-control-list-plugin" ON)
# build core first
add_subdirectory(core)
# get name of the core library
get_directory_property(
CORE_LIBRARY_NAME
DIRECTORY core
DEFINITION CORE_LIBRARY_NAME
)
# get include dir for the core library
get_directory_property(
CORE_LIBRARY_INCLUDE_DIRS
DIRECTORY core
DEFINITION CORE_LIBRARY_INCLUDE_DIRS
)
if(BUILD_SYSTEM_PLUGIN)
add_subdirectory(plugins/ietf-system-plugin)
endif()
if(BUILD_INTERFACES_PLUGIN)
add_subdirectory(plugins/ietf-interfaces-plugin)
endif()
if(BUILD_ROUTING_PLUGIN)
add_subdirectory(plugins/ietf-routing-plugin)
endif()
if(BUILD_BRIDGING_PLUGIN)
add_subdirectory(plugins/ieee802-dot1q-bridge-plugin)
endif()
if(BUILD_ACL_PLUGIN)
add_subdirectory(plugins/ietf-access-control-list-plugin)
endif()