'CMake can not find package
I am trying to compile avro-c 1.9.1 on Ubuntu 19.04. CMake fails with
CMake Error at CMakeLists.txt:188 (message):
libjansson >=2.3 not found
The section of CMakeLists.txt is
# Jansson JSON library
pkg_check_modules(JANSSON jansson>=2.3)
if (JANSSON_FOUND)
set(JANSSON_PKG libjansson)
include_directories(${JANSSON_INCLUDE_DIRS})
link_directories(${JANSSON_LIBRARY_DIRS})
else (JANSSON_FOUND)
message(FATAL_ERROR "libjansson >=2.3 not found")
endif (JANSSON_FOUND)
apt tells the following about the library:
$ apt list libjansson-dev
Listing... Done
libjansson-dev/disco,now 2.12-1build1 amd64 [installed]
I suspect that the string 2.12-1build1 fails to match some pattern, and thus CMake can not detect the package. I have tried to remove the version check, but that does not change anything.
Now I want to simply remove the check and set the relevant variables by hand instead. I would very much appreciate if someone could point me to what to write that would set the variables appropriately.
Solution 1:[1]
Thanks @Tsyvarev for your comment. pkg-config was not installed on my system.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kevin |
