From 5842f8283d5478b994e78e71b9d59972afcf8104 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 21 Aug 2018 15:55:53 +0200 Subject: [PATCH] fix Jansson dependency --- common/CMakeLists.txt | 2 +- common/lib/CMakeLists.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 2e0407f20..09ab963d9 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -31,7 +31,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) include(FindPkgConfig) -pkg_check_modules(JANSSON jansson) +pkg_check_modules(JANSSON IMPORTED_TARGET jansson) add_subdirectory(lib) add_subdirectory(tests) diff --git a/common/lib/CMakeLists.txt b/common/lib/CMakeLists.txt index 45ed67108..3bb189964 100644 --- a/common/lib/CMakeLists.txt +++ b/common/lib/CMakeLists.txt @@ -44,11 +44,10 @@ endif() target_include_directories(villas-common PUBLIC ${villas-common_SOURCE_DIR}/include ${villas-common_SOURCE_DIR}/thirdparty/spdlog/include - ${JANSSON_INCLUDE_DIRS} ) target_link_libraries(villas-common PUBLIC - ${JANSSON_LIBRARIES} + PkgConfig::JANSSON ${CMAKE_DL_LIBS} )