From d7239bcf653b9b25b1ca854c2216a28ca37804ad Mon Sep 17 00:00:00 2001 From: Michal Vasko Date: Thu, 2 May 2024 09:41:22 +0200 Subject: [PATCH] cmake UPDATE build lib only if setup script not used --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe8d66f7..5b1aa75e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,7 +80,7 @@ set(YANG_MODULE_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/yang/modul set(DATA_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/netopeer2" CACHE STRING "Directory with shared netopeer2 data") # script options -option(SYSREPO_SETUP "Install required modules with their default configuration into sysrepo" ON) +option(SYSREPO_SETUP "Install required modules with their default configuration into sysrepo using a script. If disabled, a small library is built with the same functionality" ON) set(MODULES_PERMS 600 CACHE STRING "File access permissions set for all the server modules") if(NOT MODULES_OWNER) execute_process(COMMAND id -un RESULT_VARIABLE RET @@ -417,7 +417,9 @@ if(BUILD_CLI) endif() # np2 sysrepo setup lib -add_subdirectory(lib) +if(NOT SYSREPO_SETUP) + add_subdirectory(lib) +endif() # source files to be covered by the 'format' target and a test with 'format-check' target source_format(${FORMAT_SRC})