Merge "Build with libyang"
diff --git a/.gitmodules b/.gitmodules
index 00eeb89..5e10dfb 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -13,3 +13,6 @@
 [submodule "submodules/boost"]
 	path = submodules/boost
 	url = ../../github/boostorg/boost
+[submodule "submodules/libyang"]
+	path = submodules/libyang
+	url = ../../github/CESNET/libyang
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b3e0a1..cae063a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,6 +51,9 @@
 find_package(spdlog REQUIRED)
 find_package(Boost REQUIRED)
 
+find_package(PkgConfig)
+pkg_check_modules(LIBYANG REQUIRED libyang-cpp>=0.15.111)
+
 # we don't need filename tracking, and we prefer to use header-only Boost
 add_definitions(-DBOOST_SPIRIT_X3_NO_FILESYSTEM)
 
diff --git a/ci/do-build.sh b/ci/do-build.sh
index a7177ac..ab6a105 100755
--- a/ci/do-build.sh
+++ b/ci/do-build.sh
@@ -76,6 +76,9 @@
     cp -LR boost ${PREFIX}/include/
     popd
 
+    CMAKE_OPTIONS="${CMAKE_OPTIONS} -DGEN_LANGUAGE_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF" emerge_dep libyang
+    do_test_dep_cmake libyang -j${CI_PARALLEL_JOBS}
+
     tar -C ~/target -cvJf ${TH_JOB_WORKING_DIR}/${ARTIFACT} .
     ssh th-ci-logs@ci-logs.gerrit.cesnet.cz mkdir -p artifacts/${TH_JOB_NAME} \
         || true # ignore network errors
diff --git a/submodules/libyang b/submodules/libyang
new file mode 160000
index 0000000..46ba580
--- /dev/null
+++ b/submodules/libyang
@@ -0,0 +1 @@
+Subproject commit 46ba5802b70b6cf1e9dfb03140065d6c9cd57c8b