Commit d016bffc authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

add libconfig to dependencies

parent 448a7182
......@@ -59,6 +59,7 @@ find_package(Criterion)
pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.7)
pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9)
add_subdirectory(lib)
if(CRITERION_FOUND)
......
......@@ -60,6 +60,7 @@ ADD https://villas.fein-aachen.org/packages/villas.repo /etc/yum.repos.d/
RUN dnf -y install \
jansson-devel \
libcurl-devel \
libconfig-devel \
openssl-devel openssl
# Build & Install Criterion
......
......@@ -22,9 +22,10 @@
#pragma once
#include <libconfig.h>
#include <jansson.h>
#include <villas/config.h>
#ifdef __cplusplus
extern "C" {
#endif
......@@ -33,11 +34,12 @@ extern "C" {
size_t json_dumpb(const json_t *json, char *buffer, size_t size, size_t flags);
#endif
#if (LIBCONFIG_VER_MAJOR <= 1) && (LIBCONFIG_VER_MINOR < 5)
#if defined(LIBCONFIG_FOUND) && (LIBCONFIG_VER_MAJOR <= 1) && (LIBCONFIG_VER_MINOR < 5)
#include <libconfig.h>
#define config_setting_lookup config_lookup_from
#endif
#ifdef __MACH__
#include <libkern/OSByteOrder.h>
......
......@@ -62,6 +62,7 @@ target_include_directories(villas-common PUBLIC
target_link_libraries(villas-common PUBLIC
PkgConfig::JANSSON
PkgConfig::LIBCONFIG
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
${CMAKE_DL_LIBS}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment