File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,20 +152,22 @@ set(FORMAT_SRC
152152find_package (PkgConfig )
153153if (PkgConfig_FOUND)
154154 # find libnetconf2 pkg
155- pkg_check_modules (PKG_LN2 REQUIRED libnetconf2 )
156-
157- # libnetconf2 thread count check
158- pkg_get_variable (LN2_THREAD_COUNT libnetconf2 "LN2_MAX_THREAD_COUNT" )
159- if (LN2_THREAD_COUNT)
160- if (LN2_THREAD_COUNT LESS THREAD_COUNT)
161- message (FATAL_ERROR "libnetconf2 was compiled with support up to ${LN2_THREAD_COUNT} threads, server is configured with ${THREAD_COUNT} ." )
162- else ()
163- message (STATUS "libnetconf2 was compiled with support of up to ${LN2_THREAD_COUNT} threads" )
155+ pkg_check_modules (PKG_LN2 libnetconf2 )
156+
157+ if (PKG_LN2_FOUND)
158+ # libnetconf2 thread count check
159+ pkg_get_variable (LN2_THREAD_COUNT libnetconf2 "LN2_MAX_THREAD_COUNT" )
160+ if (LN2_THREAD_COUNT)
161+ if (LN2_THREAD_COUNT LESS THREAD_COUNT)
162+ message (FATAL_ERROR "libnetconf2 was compiled with support up to ${LN2_THREAD_COUNT} threads, server is configured with ${THREAD_COUNT} ." )
163+ else ()
164+ message (STATUS "libnetconf2 was compiled with support of up to ${LN2_THREAD_COUNT} threads" )
165+ endif ()
164166 endif ()
165- endif ()
166167
167- # get libnetconf2 module directory, use it later when installing modules
168- pkg_get_variable (LN2_YANG_MODULE_DIR libnetconf2 "LN2_SCHEMAS_DIR" )
168+ # get libnetconf2 module directory, use it later when installing modules
169+ pkg_get_variable (LN2_YANG_MODULE_DIR libnetconf2 "LN2_SCHEMAS_DIR" )
170+ endif ()
169171endif ()
170172
171173# } PKGCONFIG
You can’t perform that action at this time.
0 commit comments