Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 1 | project(velia LANGUAGES CXX) |
Tomáš Pecka | a06d74d | 2020-06-14 18:18:13 +0200 | [diff] [blame] | 2 | cmake_minimum_required(VERSION 3.15) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 3 | |
| 4 | # Build options |
Václav Kubernát | b332d98 | 2021-04-16 01:40:11 +0200 | [diff] [blame] | 5 | set(CMAKE_CXX_STANDARD 20) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 6 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
| 7 | |
| 8 | set(CMAKE_CXX_FLAGS_DEBUG "-Werror ${CMAKE_CXX_FLAGS_DEBUG}") |
Václav Kubernát | d4b8a69 | 2021-04-16 01:21:44 +0200 | [diff] [blame] | 9 | set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Woverloaded-virtual -Wimplicit-fallthrough ${CMAKE_CXX_FLAGS}") |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 10 | if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
| 11 | set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}") |
| 12 | endif() |
| 13 | |
Tomáš Pecka | 5d4cf2a | 2020-07-13 13:19:41 +0200 | [diff] [blame] | 14 | if(CMAKE_CXX_FLAGS MATCHES "-stdlib=libc\\+\\+" AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) |
| 15 | set(STD_FILESYSTEM_LIBRARY c++fs) |
| 16 | elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.1) |
| 17 | set(STD_FILESYSTEM_LIBRARY stdc++fs) |
| 18 | endif() |
| 19 | |
| 20 | |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 21 | add_custom_target(velia-version-cmake-ide |
| 22 | cmake/ProjectGitVersion.cmake |
| 23 | cmake/ProjectGitVersionRunner.cmake |
| 24 | ) |
| 25 | include(cmake/ProjectGitVersion.cmake) |
| 26 | prepare_git_version(VELIA_VERSION "0.0") |
| 27 | |
| 28 | find_package(Doxygen) |
| 29 | option(WITH_DOCS "Create and install internal documentation (needs Doxygen)" ${DOXYGEN_FOUND}) |
| 30 | |
Václav Kubernát | de0e4e6 | 2021-02-08 17:46:14 +0100 | [diff] [blame] | 31 | find_package(Boost REQUIRED) |
Tomáš Pecka | a193c03 | 2020-06-22 17:33:31 +0200 | [diff] [blame] | 32 | find_package(docopt REQUIRED) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 33 | find_package(spdlog REQUIRED) |
Tomáš Pecka | 0a2e890 | 2020-06-09 21:11:20 +0200 | [diff] [blame] | 34 | find_package(sdbus-c++ REQUIRED) |
Tomáš Pecka | a433681 | 2020-07-24 15:32:58 +0200 | [diff] [blame] | 35 | find_package(PkgConfig) |
Václav Kubernát | babbab9 | 2021-01-27 09:25:05 +0100 | [diff] [blame] | 36 | find_package(fmt) |
Tomáš Pecka | a433681 | 2020-07-24 15:32:58 +0200 | [diff] [blame] | 37 | |
| 38 | pkg_check_modules(SYSTEMD REQUIRED IMPORTED_TARGET libsystemd) |
Tomáš Pecka | 1f42cfe | 2020-10-21 18:38:27 +0200 | [diff] [blame] | 39 | if(${SYSTEMD_VERSION} VERSION_EQUAL 245) |
| 40 | message(FATAL_ERROR "Systemd 245 has a bug affecting DBus method calls using sdbus-c++. Please see https://github.com/Kistler-Group/sdbus-cpp/issues/106.") |
| 41 | endif() |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 42 | |
Tomáš Pecka | 70e5456 | 2021-03-10 12:39:03 +0100 | [diff] [blame] | 43 | pkg_check_modules(SYSREPO REQUIRED sysrepo-cpp>=1.4.127 IMPORTED_TARGET sysrepo) |
Jan Kundrát | 9b8bb73 | 2021-01-27 15:39:12 +0100 | [diff] [blame] | 44 | pkg_check_modules(LIBYANG REQUIRED libyang-cpp>=1.0.215 IMPORTED_TARGET libyang) |
Tomáš Pecka | 2d578c8 | 2021-02-23 19:01:35 +0100 | [diff] [blame] | 45 | pkg_check_modules(LIBNL REQUIRED IMPORTED_TARGET libnl-route-3.0) |
Tomáš Pecka | 98ad18d | 2020-11-13 15:39:55 +0100 | [diff] [blame] | 46 | |
Tomáš Pecka | c927d66 | 2020-07-13 11:16:16 +0200 | [diff] [blame] | 47 | include(GNUInstallDirs) |
| 48 | |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 49 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/) |
| 50 | |
Tomáš Pecka | 73a13cc | 2020-11-17 11:12:19 +0100 | [diff] [blame] | 51 | set(YANG_SRCS |
Tomáš Pecka | 9a02c3f | 2021-01-21 15:27:22 +0100 | [diff] [blame] | 52 | yang/czechlight-system@2021-01-13.yang |
Tomáš Pecka | 73a13cc | 2020-11-17 11:12:19 +0100 | [diff] [blame] | 53 | yang/iana-hardware@2018-03-13.yang |
Tomáš Pecka | 73a13cc | 2020-11-17 11:12:19 +0100 | [diff] [blame] | 54 | yang/ietf-hardware@2018-03-13.yang |
Tomáš Pecka | f98ce03 | 2021-01-14 13:35:00 +0100 | [diff] [blame] | 55 | yang/iana-crypt-hash@2014-08-06.yang |
| 56 | yang/ietf-inet-types@2013-07-15.yang |
| 57 | yang/ietf-netconf-acm@2018-02-14.yang |
| 58 | yang/ietf-system@2014-08-06.yang |
| 59 | yang/ietf-yang-types@2013-07-15.yang |
Tomáš Pecka | 435ca2a | 2021-01-27 10:53:48 +0100 | [diff] [blame] | 60 | yang/ietf-ethertypes@2019-03-04.yang |
| 61 | yang/ietf-interfaces@2018-02-20.yang |
| 62 | yang/ietf-packet-fields@2019-03-04.yang |
Václav Kubernát | 637fe80 | 2021-01-22 02:43:18 +0100 | [diff] [blame] | 63 | yang/ietf-access-control-list@2019-03-04.yang |
Václav Kubernát | 457d1ad | 2021-01-22 02:43:18 +0100 | [diff] [blame] | 64 | yang/czechlight-firewall@2021-01-25.yang |
Tomáš Pecka | dac27d4 | 2021-02-22 13:20:05 +0100 | [diff] [blame] | 65 | yang/czechlight-network@2021-02-22.yang |
| 66 | yang/iana-if-type@2017-01-19.yang |
| 67 | yang/ietf-ip@2018-02-22.yang |
Tomáš Pecka | 2a4ea7b | 2021-03-30 17:01:37 +0200 | [diff] [blame] | 68 | yang/ietf-routing@2018-03-13.yang |
| 69 | yang/ietf-ipv4-unicast-routing@2018-03-13.yang |
| 70 | yang/ietf-ipv6-unicast-routing@2018-03-13.yang |
Tomáš Pecka | 73a13cc | 2020-11-17 11:12:19 +0100 | [diff] [blame] | 71 | ) |
| 72 | |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 73 | # Targets |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 74 | # - utils |
Tomáš Pecka | bd82886 | 2020-06-15 15:53:35 +0200 | [diff] [blame] | 75 | add_library(velia-utils STATIC |
Tomáš Pecka | a193c03 | 2020-06-22 17:33:31 +0200 | [diff] [blame] | 76 | src/utils/exceptions.cpp |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 77 | src/utils/exceptions.h |
Václav Kubernát | 6d9357e | 2021-01-28 15:38:24 +0100 | [diff] [blame] | 78 | src/utils/exec.cpp |
| 79 | src/utils/exec.h |
Tomáš Pecka | 491f4f2 | 2020-11-05 15:44:00 +0100 | [diff] [blame] | 80 | src/utils/io.cpp |
| 81 | src/utils/io.h |
Tomáš Pecka | a433681 | 2020-07-24 15:32:58 +0200 | [diff] [blame] | 82 | src/utils/journal.cpp |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 83 | src/utils/journal.h |
Václav Kubernát | cbdc98a | 2021-01-28 13:24:37 +0100 | [diff] [blame] | 84 | src/utils/libyang.cpp |
| 85 | src/utils/libyang.h |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 86 | src/utils/log.h |
Václav Kubernát | 6018f08 | 2021-02-11 01:32:18 +0100 | [diff] [blame] | 87 | src/utils/log.cpp |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 88 | src/utils/log-fwd.h |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 89 | src/utils/log-init.cpp |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 90 | src/utils/log-init.h |
Tomáš Pecka | ba2dc31 | 2021-01-23 22:29:11 +0100 | [diff] [blame] | 91 | src/utils/sysrepo.cpp |
| 92 | src/utils/sysrepo.h |
Tomáš Pecka | 339bc67 | 2020-11-11 15:59:03 +0100 | [diff] [blame] | 93 | src/utils/time.cpp |
| 94 | src/utils/time.h |
Tomáš Pecka | d033707 | 2021-01-25 19:57:00 +0100 | [diff] [blame] | 95 | src/utils/waitUntilSignalled.cpp |
| 96 | src/utils/waitUntilSignalled.h |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 97 | ) |
Václav Kubernát | 6018f08 | 2021-02-11 01:32:18 +0100 | [diff] [blame] | 98 | target_link_libraries(velia-utils PUBLIC spdlog::spdlog PRIVATE PkgConfig::SYSTEMD PkgConfig::SYSREPO fmt::fmt docopt) |
Tomáš Pecka | a433681 | 2020-07-24 15:32:58 +0200 | [diff] [blame] | 99 | |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 100 | # - health |
| 101 | add_library(velia-health STATIC |
| 102 | src/health/inputs/AbstractInput.cpp |
| 103 | src/health/inputs/DbusSemaphoreInput.cpp |
| 104 | src/health/inputs/DbusSystemdInput.cpp |
| 105 | src/health/manager/AbstractManager.cpp |
| 106 | src/health/manager/StateManager.cpp |
| 107 | src/health/outputs/LedSysfsDriver.cpp |
| 108 | src/health/outputs/callables.cpp |
| 109 | src/health/State.cpp |
Tomáš Pecka | 74b885f | 2020-06-06 20:02:41 +0200 | [diff] [blame] | 110 | ) |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 111 | target_link_libraries(velia-health |
| 112 | PUBLIC |
| 113 | velia-utils |
| 114 | Boost::boost |
| 115 | SDBusCpp::sdbus-c++ |
| 116 | ${STD_FILESYSTEM_LIBRARY} |
| 117 | ) |
Tomáš Pecka | 74b885f | 2020-06-06 20:02:41 +0200 | [diff] [blame] | 118 | |
Tomáš Pecka | 491f4f2 | 2020-11-05 15:44:00 +0100 | [diff] [blame] | 119 | # - ietf-hardware |
| 120 | add_library(velia-ietf-hardware STATIC |
| 121 | src/ietf-hardware/sysfs/EMMC.cpp |
| 122 | src/ietf-hardware/sysfs/EMMC.h |
Tomáš Pecka | 9b1c967 | 2020-11-11 15:24:06 +0100 | [diff] [blame] | 123 | src/ietf-hardware/sysfs/HWMon.cpp |
| 124 | src/ietf-hardware/sysfs/HWMon.h |
Tomáš Pecka | 339bc67 | 2020-11-11 15:59:03 +0100 | [diff] [blame] | 125 | src/ietf-hardware/IETFHardware.cpp |
| 126 | src/ietf-hardware/IETFHardware.h |
Václav Kubernát | 97e5ea1 | 2021-03-24 00:36:57 +0100 | [diff] [blame^] | 127 | src/ietf-hardware/FspYhPsu.cpp |
| 128 | src/ietf-hardware/FspYhPsu.h |
Tomáš Pecka | 491f4f2 | 2020-11-05 15:44:00 +0100 | [diff] [blame] | 129 | ) |
| 130 | target_link_libraries(velia-ietf-hardware |
| 131 | PUBLIC |
| 132 | velia-utils |
| 133 | ${STD_FILESYSTEM_LIBRARY} |
Tomáš Pecka | 9b1c967 | 2020-11-11 15:24:06 +0100 | [diff] [blame] | 134 | Boost::boost |
Tomáš Pecka | 491f4f2 | 2020-11-05 15:44:00 +0100 | [diff] [blame] | 135 | ) |
Tomáš Pecka | 491f4f2 | 2020-11-05 15:44:00 +0100 | [diff] [blame] | 136 | |
Tomáš Pecka | 98ad18d | 2020-11-13 15:39:55 +0100 | [diff] [blame] | 137 | add_library(velia-ietf-hardware-sysrepo STATIC |
Tomáš Pecka | 98ad18d | 2020-11-13 15:39:55 +0100 | [diff] [blame] | 138 | src/ietf-hardware/sysrepo/Sysrepo.cpp |
| 139 | src/ietf-hardware/sysrepo/Sysrepo.h |
| 140 | ) |
| 141 | target_link_libraries(velia-ietf-hardware-sysrepo |
| 142 | PUBLIC |
| 143 | velia-utils |
| 144 | PkgConfig::SYSREPO |
| 145 | PkgConfig::LIBYANG |
| 146 | ) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 147 | |
Václav Kubernát | 6d9357e | 2021-01-28 15:38:24 +0100 | [diff] [blame] | 148 | set(NOBODY_UID 65534 CACHE STRING "UID which refers to 'nobody'. Used for dropping root privileges.") |
| 149 | set(NOBODY_GID 65534 CACHE STRING "GID which refers to 'nobody'. Used for dropping root privileges.") |
| 150 | |
Václav Kubernát | de0e4e6 | 2021-02-08 17:46:14 +0100 | [diff] [blame] | 151 | if(NOT NFT_EXECUTABLE) |
| 152 | find_program(NFT_EXECUTABLE nft) |
| 153 | endif() |
Václav Kubernát | babbab9 | 2021-01-27 09:25:05 +0100 | [diff] [blame] | 154 | if(NOT SSH_KEYGEN_EXECUTABLE) |
| 155 | find_program(SSH_KEYGEN_EXECUTABLE ssh-keygen) |
| 156 | endif() |
| 157 | if(NOT CHPASSWD_EXECUTABLE) |
| 158 | find_program(CHPASSWD_EXECUTABLE chpasswd) |
| 159 | endif() |
Tomáš Pecka | 879a603 | 2021-02-03 17:21:48 +0100 | [diff] [blame] | 160 | if(NOT SYSTEMCTL_EXECUTABLE) |
| 161 | find_program(SYSTEMCTL_EXECUTABLE systemctl) |
| 162 | endif() |
Tomáš Pecka | 5c19e72 | 2021-02-15 20:41:29 +0100 | [diff] [blame] | 163 | if(NOT NETWORKCTL_EXECUTABLE) |
| 164 | find_program(NETWORKCTL_EXECUTABLE networkctl) |
| 165 | endif() |
Václav Kubernát | 566c940 | 2021-02-10 08:33:54 +0100 | [diff] [blame] | 166 | if(NOT HOSTNAMECTL_EXECUTABLE) |
| 167 | find_program(HOSTNAMECTL_EXECUTABLE hostnamectl) |
| 168 | endif() |
Václav Kubernát | babbab9 | 2021-01-27 09:25:05 +0100 | [diff] [blame] | 169 | |
| 170 | set(VELIA_AUTHORIZED_KEYS_FORMAT "{HOME}/.ssh/authorized_keys" CACHE STRING "pattern for determining path to users' SSH authorized_keys file. Must at least one of '{USER}' or '{HOME}' which will get replaced by the name of the user and the home directory of the user respectively.") |
| 171 | if(NOT VELIA_AUTHORIZED_KEYS_FORMAT) |
| 172 | message(FATAL_ERROR "VELIA_AUTHORIZED_KEYS_FORMAT not set.") |
| 173 | endif() |
| 174 | |
| 175 | if(NOT VELIA_AUTHORIZED_KEYS_FORMAT MATCHES "{USER}" AND NOT VELIA_AUTHORIZED_KEYS_FORMAT MATCHES "{HOME}") |
| 176 | message(FATAL_ERROR "Wrong format string given for VELIA_AUTHORIZED_KEYS_FORMAT: at least one of {USER} or {HOME} expected.") |
| 177 | endif() |
| 178 | |
| 179 | set(VELIA_REAL_ETC_PASSWD "/etc/passwd" CACHE STRING "Path to passwd file") |
| 180 | if(NOT VELIA_REAL_ETC_PASSWD) |
| 181 | message(FATAL_ERROR "VELIA_REAL_ETC_PASSWD not set") |
| 182 | endif() |
| 183 | |
| 184 | set(VELIA_REAL_ETC_SHADOW "/etc/shadow" CACHE STRING "Path to shadow file") |
| 185 | if(NOT VELIA_REAL_ETC_SHADOW) |
| 186 | message(FATAL_ERROR "VELIA_REAL_ETC_SHADOW not set") |
| 187 | endif() |
| 188 | |
| 189 | set(VELIA_BACKUP_ETC_SHADOW "/etc/shadow" CACHE STRING "Path to where /etc/shadow gets copied to upon each change") |
| 190 | if(NOT VELIA_BACKUP_ETC_SHADOW) |
| 191 | message(FATAL_ERROR "VELIA_BACKUP_ETC_SHADOW not set") |
| 192 | endif() |
Václav Kubernát | de0e4e6 | 2021-02-08 17:46:14 +0100 | [diff] [blame] | 193 | |
Václav Kubernát | 566c940 | 2021-02-10 08:33:54 +0100 | [diff] [blame] | 194 | set(VELIA_BACKUP_ETC_HOSTNAME "/etc/hostname" CACHE STRING "Path to hostname file") |
| 195 | if(NOT VELIA_BACKUP_ETC_HOSTNAME ) |
| 196 | message(FATAL_ERROR "VELIA_BACKUP_ETC_HOSTNAME not set") |
| 197 | endif() |
| 198 | |
Václav Kubernát | 6d9357e | 2021-01-28 15:38:24 +0100 | [diff] [blame] | 199 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/system/system_vars.h.in ${CMAKE_CURRENT_BINARY_DIR}/system_vars.h @ONLY) |
| 200 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
| 201 | |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 202 | # - ietf-system |
| 203 | add_library(velia-system STATIC |
Tomáš Pecka | 991e4d5 | 2021-01-11 10:03:14 +0100 | [diff] [blame] | 204 | src/system/RAUC.cpp |
| 205 | src/system/RAUC.h |
Tomáš Pecka | 594a676 | 2021-01-29 11:06:08 +0100 | [diff] [blame] | 206 | src/system/Firmware.cpp |
| 207 | src/system/Firmware.h |
Tomáš Pecka | f976c5b | 2021-01-23 21:19:52 +0100 | [diff] [blame] | 208 | src/system/IETFSystem.cpp |
| 209 | src/system/IETFSystem.h |
Václav Kubernát | babbab9 | 2021-01-27 09:25:05 +0100 | [diff] [blame] | 210 | src/system/Authentication.cpp |
| 211 | src/system/Authentication.h |
Tomáš Pecka | 5c19e72 | 2021-02-15 20:41:29 +0100 | [diff] [blame] | 212 | src/system/Network.cpp |
| 213 | src/system/Network.h |
Tomáš Pecka | 2d578c8 | 2021-02-23 19:01:35 +0100 | [diff] [blame] | 214 | src/system/Rtnetlink.cpp |
| 215 | src/system/Rtnetlink.h |
Tomáš Pecka | f10b930 | 2021-02-23 19:02:02 +0100 | [diff] [blame] | 216 | src/system/IETFInterfaces.cpp |
| 217 | src/system/IETFInterfaces.h |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 218 | ) |
| 219 | target_link_libraries(velia-system |
| 220 | PUBLIC |
| 221 | velia-utils |
| 222 | PkgConfig::SYSREPO |
| 223 | PkgConfig::LIBYANG |
Tomáš Pecka | 2d578c8 | 2021-02-23 19:01:35 +0100 | [diff] [blame] | 224 | PkgConfig::LIBNL |
Václav Kubernát | 6dd52c8 | 2021-01-21 08:38:42 +0100 | [diff] [blame] | 225 | SDBusCpp::sdbus-c++ |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 226 | ) |
| 227 | |
Václav Kubernát | d386aba | 2021-01-19 10:03:28 +0100 | [diff] [blame] | 228 | # - firewall |
| 229 | add_library(velia-firewall STATIC |
| 230 | src/firewall/Firewall.cpp |
| 231 | ) |
| 232 | target_link_libraries(velia-firewall |
| 233 | PUBLIC |
| 234 | velia-utils |
| 235 | PkgConfig::SYSREPO |
| 236 | PRIVATE |
| 237 | PkgConfig::LIBYANG |
| 238 | ) |
| 239 | |
| 240 | |
Tomáš Pecka | 625b7a1 | 2021-01-23 20:55:51 +0100 | [diff] [blame] | 241 | # - daemons |
Tomáš Pecka | cd19e62 | 2021-01-27 09:18:11 +0100 | [diff] [blame] | 242 | add_executable(veliad-health |
| 243 | src/main-health.cpp |
Tomáš Pecka | 139e361 | 2021-01-25 19:49:00 +0100 | [diff] [blame] | 244 | src/health/Factory.cpp |
| 245 | src/health/Factory.h |
| 246 | ) |
Tomáš Pecka | cd19e62 | 2021-01-27 09:18:11 +0100 | [diff] [blame] | 247 | target_link_libraries(veliad-health |
Tomáš Pecka | aae9fe3 | 2021-01-25 19:57:22 +0100 | [diff] [blame] | 248 | PUBLIC |
Tomáš Pecka | d03044f | 2020-11-12 14:33:10 +0100 | [diff] [blame] | 249 | velia-health |
Tomáš Pecka | d03044f | 2020-11-12 14:33:10 +0100 | [diff] [blame] | 250 | docopt |
Tomáš Pecka | aae9fe3 | 2021-01-25 19:57:22 +0100 | [diff] [blame] | 251 | ) |
Tomáš Pecka | cd19e62 | 2021-01-27 09:18:11 +0100 | [diff] [blame] | 252 | add_dependencies(veliad-health target-VELIA_VERSION) |
| 253 | target_include_directories(veliad-health PUBLIC ${CMAKE_BINARY_DIR}) |
Tomáš Pecka | d03044f | 2020-11-12 14:33:10 +0100 | [diff] [blame] | 254 | |
Tomáš Pecka | 625b7a1 | 2021-01-23 20:55:51 +0100 | [diff] [blame] | 255 | add_executable(veliad-system |
| 256 | src/main-system.cpp |
| 257 | ) |
| 258 | target_link_libraries(veliad-system |
| 259 | PUBLIC |
| 260 | velia-system |
| 261 | docopt |
| 262 | ) |
| 263 | add_dependencies(veliad-system target-VELIA_VERSION) |
| 264 | target_include_directories(veliad-system PUBLIC ${CMAKE_BINARY_DIR}) |
| 265 | |
Václav Kubernát | d386aba | 2021-01-19 10:03:28 +0100 | [diff] [blame] | 266 | add_executable(veliad-firewall |
| 267 | src/main-firewall.cpp |
| 268 | ) |
| 269 | target_link_libraries(veliad-firewall |
| 270 | PUBLIC |
| 271 | velia-firewall |
| 272 | velia-utils |
Václav Kubernát | d386aba | 2021-01-19 10:03:28 +0100 | [diff] [blame] | 273 | docopt |
| 274 | ) |
| 275 | add_dependencies(veliad-firewall target-VELIA_VERSION) |
| 276 | target_include_directories(veliad-firewall PUBLIC ${CMAKE_BINARY_DIR}) |
| 277 | |
Tomáš Pecka | aae9fe3 | 2021-01-25 19:57:22 +0100 | [diff] [blame] | 278 | add_executable(veliad-hardware |
| 279 | src/main-hardware.cpp |
| 280 | src/ietf-hardware/Factory.cpp |
| 281 | src/ietf-hardware/Factory.h |
| 282 | ) |
| 283 | target_link_libraries(veliad-hardware |
| 284 | PUBLIC |
| 285 | velia-ietf-hardware |
| 286 | velia-ietf-hardware-sysrepo |
| 287 | docopt |
| 288 | ) |
| 289 | add_dependencies(veliad-hardware target-VELIA_VERSION) |
| 290 | target_include_directories(veliad-hardware PUBLIC ${CMAKE_BINARY_DIR}) |
| 291 | |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 292 | # Testing |
Tomáš Pecka | a06d74d | 2020-06-14 18:18:13 +0200 | [diff] [blame] | 293 | include(CTest) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 294 | if(BUILD_TESTING) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 295 | find_package(trompeloeil 33 REQUIRED) |
| 296 | find_package(doctest 2.3.1 REQUIRED) |
| 297 | |
Tomáš Pecka | efd8843 | 2020-06-17 15:31:39 +0200 | [diff] [blame] | 298 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/configure.cmake.h.in ${CMAKE_CURRENT_BINARY_DIR}/tests/configure.cmake.h) |
| 299 | |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 300 | add_library(DoctestIntegration STATIC |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 301 | tests/doctest_integration.cpp |
| 302 | tests/trompeloeil_doctest.h |
| 303 | tests/wait-a-bit-longer.cpp |
| 304 | ) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 305 | target_link_libraries(DoctestIntegration doctest::doctest trompeloeil spdlog::spdlog) |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 306 | target_include_directories(DoctestIntegration PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tests/) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 307 | target_compile_definitions(DoctestIntegration PUBLIC DOCTEST_CONFIG_SUPER_FAST_ASSERTS) |
| 308 | |
Tomáš Pecka | a18702d | 2021-01-25 18:07:23 +0100 | [diff] [blame] | 309 | add_library(SysrepoTesting STATIC |
| 310 | tests/mock/sysrepo/events.cpp |
| 311 | tests/mock/sysrepo/events.h |
| 312 | ) |
| 313 | target_link_libraries(SysrepoTesting DoctestIntegration PkgConfig::SYSREPO) |
| 314 | |
Tomáš Pecka | 0a2e890 | 2020-06-09 21:11:20 +0200 | [diff] [blame] | 315 | add_library(DbusTesting STATIC |
Tomáš Pecka | 991e4d5 | 2021-01-11 10:03:14 +0100 | [diff] [blame] | 316 | tests/dbus-helpers/dbus_rauc_server.cpp |
| 317 | tests/dbus-helpers/dbus_rauc_server.h |
Tomáš Pecka | 0a2e890 | 2020-06-09 21:11:20 +0200 | [diff] [blame] | 318 | tests/dbus-helpers/dbus_semaphore_server.cpp |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 319 | tests/dbus-helpers/dbus_semaphore_server.h |
Tomáš Pecka | ccd80c3 | 2020-06-22 14:44:32 +0200 | [diff] [blame] | 320 | tests/dbus-helpers/dbus_systemd_server.cpp |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 321 | tests/dbus-helpers/dbus_systemd_server.h |
| 322 | ) |
| 323 | target_link_libraries(DbusTesting |
| 324 | PUBLIC |
| 325 | velia-utils |
| 326 | SDBusCpp::sdbus-c++ |
| 327 | ) |
Tomáš Pecka | 0a2e890 | 2020-06-09 21:11:20 +0200 | [diff] [blame] | 328 | |
Tomáš Pecka | 9b1c967 | 2020-11-11 15:24:06 +0100 | [diff] [blame] | 329 | add_library(FsTestUtils STATIC |
| 330 | tests/fs-helpers/FileInjector.cpp |
| 331 | tests/fs-helpers/FileInjector.h |
| 332 | tests/fs-helpers/utils.cpp |
| 333 | tests/fs-helpers/utils.h |
| 334 | ) |
| 335 | target_link_libraries(FsTestUtils |
| 336 | PUBLIC |
| 337 | ${STD_FILESYSTEM_LIBRARY} |
| 338 | ) |
| 339 | |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 340 | function(velia_test name) |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 341 | add_executable(test-${name} ${CMAKE_SOURCE_DIR}/tests/${name}.cpp) |
| 342 | target_link_libraries(test-${name} DoctestIntegration ${ARGN}) |
| 343 | target_include_directories(test-${name} |
| 344 | PUBLIC |
| 345 | ${CMAKE_CURRENT_SOURCE_DIR} |
| 346 | PRIVATE |
| 347 | ${CMAKE_BINARY_DIR} |
| 348 | ) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 349 | |
| 350 | if(NOT CMAKE_CROSSCOMPILING) |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 351 | add_test(test-${name} test-${name}) |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 352 | endif() |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 353 | endfunction() |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 354 | |
Tomáš Pecka | 98ad18d | 2020-11-13 15:39:55 +0100 | [diff] [blame] | 355 | find_program(SYSREPOCTL sysrepoctl) |
| 356 | find_program(SYSREPOCFG sysrepocfg) |
| 357 | |
| 358 | set(sysrepo_previous_fixture_name UNDEFINED) |
| 359 | function(sysrepo_fixture_env name) |
| 360 | set(test_name_init sysrepo:prep:${name}) |
| 361 | set(test_name_cleanup sysrepo:clean:${name}) |
| 362 | set(fixture_name sysrepo:env:${name}) |
| 363 | |
| 364 | add_test(NAME ${test_name_init} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/sysrepoctl-manage-module.sh ${SYSREPOCTL} ${SYSREPOCFG} prepare ${ARGN}) |
| 365 | set_tests_properties(${test_name_init} PROPERTIES FIXTURES_SETUP ${fixture_name} RESOURCE_LOCK sysrepo) |
| 366 | add_test(NAME ${test_name_cleanup} COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/sysrepoctl-manage-module.sh ${SYSREPOCTL} ${SYSREPOCFG} uninstall ${ARGN}) |
| 367 | set_tests_properties(${test_name_cleanup} PROPERTIES FIXTURES_CLEANUP ${fixture_name} RESOURCE_LOCK sysrepo) |
| 368 | |
| 369 | if (sysrepo_previous_fixture_name) |
| 370 | set_tests_properties(${test_name_init} PROPERTIES DEPENDS sysrepo:clean:${sysrepo_previous_fixture_name}) |
| 371 | endif () |
| 372 | |
| 373 | set(sysrepo_previous_fixture_name ${name} PARENT_SCOPE) |
| 374 | endfunction() |
| 375 | |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 376 | velia_test(health_state-manager velia-health) |
| 377 | velia_test(health_input-semaphore velia-health DbusTesting) |
| 378 | velia_test(health_input-systemd velia-health DbusTesting) |
| 379 | velia_test(health_output-led velia-health) |
Tomáš Pecka | 491f4f2 | 2020-11-05 15:44:00 +0100 | [diff] [blame] | 380 | |
Tomáš Pecka | 991e4d5 | 2021-01-11 10:03:14 +0100 | [diff] [blame] | 381 | velia_test(system_rauc velia-system DbusTesting) |
Tomáš Pecka | cb7a5f8 | 2021-01-20 15:12:00 +0100 | [diff] [blame] | 382 | set_tests_properties( |
| 383 | test-system_rauc |
| 384 | PROPERTIES RESOURCE_LOCK dbus-rauc |
| 385 | ) |
Tomáš Pecka | 991e4d5 | 2021-01-11 10:03:14 +0100 | [diff] [blame] | 386 | |
Tomáš Pecka | 9b1c967 | 2020-11-11 15:24:06 +0100 | [diff] [blame] | 387 | velia_test(hardware_emmc velia-ietf-hardware FsTestUtils) |
| 388 | velia_test(hardware_hwmon velia-ietf-hardware FsTestUtils) |
Tomáš Pecka | 83b62e1 | 2020-12-16 14:50:49 +0100 | [diff] [blame] | 389 | |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 390 | sysrepo_fixture_env(sysrepo-ietf-system YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-system@2014-08-06.yang) |
Tomáš Pecka | f976c5b | 2021-01-23 21:19:52 +0100 | [diff] [blame] | 391 | velia_test(sysrepo_system-ietfsystem velia-system DbusTesting) |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 392 | set_tests_properties( |
Tomáš Pecka | f976c5b | 2021-01-23 21:19:52 +0100 | [diff] [blame] | 393 | test-sysrepo_system-ietfsystem |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 394 | PROPERTIES FIXTURES_REQUIRED sysrepo:env:sysrepo-ietf-system |
| 395 | RESOURCE_LOCK sysrepo |
Tomáš Pecka | cb7a5f8 | 2021-01-20 15:12:00 +0100 | [diff] [blame] | 396 | ) |
| 397 | |
| 398 | sysrepo_fixture_env(sysrepo-czechlight-system YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/czechlight-system@2021-01-13.yang) |
Tomáš Pecka | 594a676 | 2021-01-29 11:06:08 +0100 | [diff] [blame] | 399 | velia_test(sysrepo_system-firmware velia-system DbusTesting) |
| 400 | target_link_libraries(test-sysrepo_system-firmware SysrepoTesting) |
Tomáš Pecka | cb7a5f8 | 2021-01-20 15:12:00 +0100 | [diff] [blame] | 401 | set_tests_properties( |
Tomáš Pecka | 594a676 | 2021-01-29 11:06:08 +0100 | [diff] [blame] | 402 | test-sysrepo_system-firmware |
Tomáš Pecka | cb7a5f8 | 2021-01-20 15:12:00 +0100 | [diff] [blame] | 403 | PROPERTIES FIXTURES_REQUIRED sysrepo:env:sysrepo-czechlight-system |
| 404 | RESOURCE_LOCK "sysrepo;dbus-rauc" |
Tomáš Pecka | 292bc9c | 2021-01-11 22:03:11 +0100 | [diff] [blame] | 405 | ) |
| 406 | |
Václav Kubernát | babbab9 | 2021-01-27 09:25:05 +0100 | [diff] [blame] | 407 | velia_test(sysrepo_authentication velia-system FsTestUtils) |
| 408 | |
| 409 | set_tests_properties( |
| 410 | test-sysrepo_authentication |
| 411 | PROPERTIES FIXTURES_REQUIRED sysrepo:env:sysrepo-czechlight-system |
| 412 | RESOURCE_LOCK sysrepo |
| 413 | ) |
| 414 | |
Tomáš Pecka | 5c19e72 | 2021-02-15 20:41:29 +0100 | [diff] [blame] | 415 | velia_test(sysrepo_system-network velia-system) |
| 416 | target_link_libraries(test-sysrepo_system-network FsTestUtils) |
| 417 | set_tests_properties( |
| 418 | test-sysrepo_system-network |
| 419 | PROPERTIES FIXTURES_REQUIRED sysrepo:env:sysrepo-czechlight-system |
| 420 | RESOURCE_LOCK sysrepo |
| 421 | ) |
| 422 | |
Tomáš Pecka | f10b930 | 2021-02-23 19:02:02 +0100 | [diff] [blame] | 423 | sysrepo_fixture_env(sysrepo-czechlight-network |
| 424 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/iana-if-type@2017-01-19.yang |
| 425 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-interfaces@2018-02-20.yang |
| 426 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-ip@2018-02-22.yang |
Tomáš Pecka | 2a4ea7b | 2021-03-30 17:01:37 +0200 | [diff] [blame] | 427 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-routing@2018-03-13.yang |
| 428 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-ipv4-unicast-routing@2018-03-13.yang |
| 429 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-ipv6-unicast-routing@2018-03-13.yang |
Tomáš Pecka | f10b930 | 2021-02-23 19:02:02 +0100 | [diff] [blame] | 430 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/czechlight-network@2021-02-22.yang) |
| 431 | velia_test(sysrepo_system-ietfinterfaces velia-system) |
| 432 | set_tests_properties( |
| 433 | test-sysrepo_system-ietfinterfaces |
| 434 | PROPERTIES FIXTURES_REQUIRED sysrepo:env:sysrepo-czechlight-network |
| 435 | RESOURCE_LOCK sysrepo |
| 436 | ) |
| 437 | |
Tomáš Pecka | 83b62e1 | 2020-12-16 14:50:49 +0100 | [diff] [blame] | 438 | sysrepo_fixture_env(sysrepo-ietf-hardware YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/iana-hardware@2018-03-13.yang YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-hardware@2018-03-13.yang FEATURE hardware-sensor) |
Václav Kubernát | 97e5ea1 | 2021-03-24 00:36:57 +0100 | [diff] [blame^] | 439 | velia_test(hardware_ietf-hardware velia-ietf-hardware velia-ietf-hardware-sysrepo FsTestUtils) |
Tomáš Pecka | 98ad18d | 2020-11-13 15:39:55 +0100 | [diff] [blame] | 440 | set_tests_properties( |
| 441 | test-hardware_ietf-hardware |
Tomáš Pecka | 83b62e1 | 2020-12-16 14:50:49 +0100 | [diff] [blame] | 442 | PROPERTIES FIXTURES_REQUIRED sysrepo:env:sysrepo-ietf-hardware |
Tomáš Pecka | 55f64f8 | 2020-12-10 19:03:30 +0100 | [diff] [blame] | 443 | RESOURCE_LOCK sysrepo |
| 444 | ) |
| 445 | |
| 446 | velia_test(sysrepo_two-daemons velia-ietf-hardware-sysrepo) |
Tomáš Pecka | 83b62e1 | 2020-12-16 14:50:49 +0100 | [diff] [blame] | 447 | # ctest dance for sysrepo_two-daemons: compile daemon, create a fixture for test, add the test into the fixture |
Tomáš Pecka | 55f64f8 | 2020-12-10 19:03:30 +0100 | [diff] [blame] | 448 | add_executable(test-sysrepo_test_merge-daemon ${CMAKE_SOURCE_DIR}/tests/sysrepo_two-daemons_daemon.cpp) |
| 449 | target_link_libraries(test-sysrepo_test_merge-daemon PkgConfig::SYSREPO PkgConfig::LIBYANG) |
| 450 | |
| 451 | add_test(NAME sysrepo_test_merge-start COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/sysrepo_two-daemons_control.sh start) |
| 452 | add_test(NAME sysrepo_test_merge-stop COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/sysrepo_two-daemons_control.sh stop) |
| 453 | set_tests_properties(sysrepo_test_merge-start PROPERTIES FIXTURES_SETUP sysrepo:two-daemons RESOURCE_LOCK sysrepo) |
| 454 | set_tests_properties(sysrepo_test_merge-stop PROPERTIES FIXTURES_CLEANUP sysrepo:two-daemons RESOURCE_LOCK sysrepo) |
Tomáš Pecka | 55f64f8 | 2020-12-10 19:03:30 +0100 | [diff] [blame] | 455 | |
| 456 | set_tests_properties( |
| 457 | test-sysrepo_two-daemons |
| 458 | PROPERTIES |
| 459 | FIXTURES_REQUIRED "sysrepo:two-daemons;sysrepo:env:sysrepo-ietf-hardware" |
Tomáš Pecka | 98ad18d | 2020-11-13 15:39:55 +0100 | [diff] [blame] | 460 | RESOURCE_LOCK sysrepo |
| 461 | ) |
Tomáš Pecka | 83b62e1 | 2020-12-16 14:50:49 +0100 | [diff] [blame] | 462 | # ensure we run two-daemons merge test and ietf-hardware test sequentially and don't cleanup before everything ends |
| 463 | set_tests_properties(sysrepo_test_merge-start PROPERTIES DEPENDS test-hardware_ietf-hardware) |
| 464 | set_tests_properties(sysrepo:clean:sysrepo-ietf-hardware PROPERTIES DEPENDS sysrepo_test_merge-stop) |
| 465 | |
Tomáš Pecka | 73a13cc | 2020-11-17 11:12:19 +0100 | [diff] [blame] | 466 | |
| 467 | find_program(YANGLINT_PATH yanglint) |
| 468 | if (NOT YANGLINT_PATH) |
| 469 | message(FATAL_ERROR "Cannot find libyang's yanglint") |
| 470 | endif() |
| 471 | foreach(yang_file ${YANG_SRCS}) |
| 472 | add_test(NAME yang-tree:${yang_file} COMMAND ${YANGLINT_PATH} -f tree ${CMAKE_CURRENT_SOURCE_DIR}/${yang_file}) |
| 473 | endforeach() |
Václav Kubernát | d386aba | 2021-01-19 10:03:28 +0100 | [diff] [blame] | 474 | |
| 475 | sysrepo_fixture_env(sysrepo-firewall |
| 476 | # Installing czechlight-firewall automatically installs ietf-access-control-list as implemented (not just |
| 477 | # imported) but I still need to install it myself to enable the features. |
| 478 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/ietf-access-control-list@2019-03-04.yang |
| 479 | FEATURE eth |
| 480 | FEATURE match-on-eth |
| 481 | FEATURE match-on-ipv4 |
| 482 | FEATURE ipv4 |
| 483 | FEATURE match-on-ipv6 |
| 484 | FEATURE ipv6 |
| 485 | FEATURE mixed-eth-ipv4-ipv6 |
| 486 | YANG ${CMAKE_CURRENT_SOURCE_DIR}/yang/czechlight-firewall@2021-01-25.yang |
| 487 | ) |
| 488 | |
| 489 | velia_test(sysrepo-firewall velia-firewall) |
| 490 | set_tests_properties( |
| 491 | test-sysrepo-firewall |
| 492 | PROPERTIES FIXTURES_REQUIRED sysrepo:env:sysrepo-firewall |
| 493 | RESOURCE_LOCK sysrepo |
| 494 | ) |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 495 | endif() |
Tomáš Pecka | c927d66 | 2020-07-13 11:16:16 +0200 | [diff] [blame] | 496 | |
Tomáš Pecka | 5123e00 | 2020-06-05 15:29:21 +0200 | [diff] [blame] | 497 | if(WITH_DOCS) |
| 498 | set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) |
| 499 | set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) |
| 500 | configure_file(${doxyfile_in} ${doxyfile} @ONLY) |
| 501 | add_custom_target(doc |
| 502 | COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} |
| 503 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
| 504 | COMMENT "Generating API documentation with Doxygen" |
| 505 | VERBATIM |
| 506 | SOURCES ${doxyfile_in} |
| 507 | ) |
Tomáš Pecka | a06d74d | 2020-06-14 18:18:13 +0200 | [diff] [blame] | 508 | endif() |
Tomáš Pecka | 261c886 | 2020-11-05 11:23:08 +0100 | [diff] [blame] | 509 | |
Tomáš Pecka | 73a13cc | 2020-11-17 11:12:19 +0100 | [diff] [blame] | 510 | set(YANG_DIR ${CMAKE_INSTALL_PREFIX}/share/velia/yang) |
| 511 | install(FILES ${YANG_SRCS} DESTINATION ${YANG_DIR}) |
Tomáš Pecka | eb31772 | 2021-04-13 21:33:20 +0200 | [diff] [blame] | 512 | install(FILES ${CMAKE_SOURCE_DIR}/yang/ietf-ipv6-router-advertisements@2018-03-13.yang DESTINATION ${YANG_DIR}) |
Tomáš Pecka | cd19e62 | 2021-01-27 09:18:11 +0100 | [diff] [blame] | 513 | install(TARGETS veliad-health RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/) |
Tomáš Pecka | 625b7a1 | 2021-01-23 20:55:51 +0100 | [diff] [blame] | 514 | install(TARGETS veliad-system RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/) |
Tomáš Pecka | aae9fe3 | 2021-01-25 19:57:22 +0100 | [diff] [blame] | 515 | install(TARGETS veliad-hardware RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/) |
Tomáš Pecka | fb14b18 | 2021-01-27 10:54:00 +0100 | [diff] [blame] | 516 | install(TARGETS veliad-firewall RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/) |