build: simplify installation of YANG submodules
As explained in eb317722 (yang: Install
ietf-ipv6-router-advertisements), this file is a YANG submodule, so we
cannot call `yanglint -f tree` on it directly. Let's at least add it to
a variable so that the installation is "less strange".
Change-Id: If846ebd598d74aa28434ab30a49f8ef00ece548e
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14142fe..84f9ff6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,10 @@
yang/velia-alarms@2022-07-12.yang
)
+set(YANG_SUBMODULES
+ yang/ietf-ipv6-router-advertisements@2018-03-13.yang
+ )
+
# temporary until our CI switches to fmt>=9
add_compile_definitions(FMT_DEPRECATED_OSTREAM)
@@ -525,9 +529,8 @@
endif()
set(YANG_DIR ${CMAKE_INSTALL_PREFIX}/share/velia/yang)
-install(FILES ${YANG_SRCS} DESTINATION ${YANG_DIR})
+install(FILES ${YANG_SRCS} ${YANG_SUBMODULES} DESTINATION ${YANG_DIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/yang/czechlight-authentication.json DESTINATION ${YANG_DIR})
-install(FILES ${CMAKE_SOURCE_DIR}/yang/ietf-ipv6-router-advertisements@2018-03-13.yang DESTINATION ${YANG_DIR})
install(TARGETS veliad-health RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/)
install(TARGETS veliad-system RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/)
install(TARGETS veliad-hardware RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/)