Skip to content

Commit

Permalink
cmake UPDATE build lib only if setup script not used
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed May 2, 2024
1 parent eee198d commit d7239bc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit d7239bc

Please sign in to comment.