Open skoehler opened 7 years ago
Thanks for reporting!
Looking into this one, I think it can also be fixed by just removing json
entry @Hbrinj added a while ago at this line: https://github.com/intel-iot-devkit/mraa/blob/master/cmake/modules/FindJSON-C.cmake#L6
@Hbrinj, could you please clarify why you've added that one?
On Arch Linux, Raspberry 2, cmake detects the json-c library's include folder as
JSON-C_INCLUDE_DIR=/usr/include/json/
which leads to a rather confusing errorI had to override things with
cmake -DJSON-C_INCLUDE_DIR=/usr/include/json-c/
.The problem is that
/usr/include/json
and/usr/include/json-c
both contain a file calledjson.h
which is used by your cmake scripts to find the right folder. The former belongs to a json c++ library. The latter is the json C library.The cmake check could probably be improved by using
json_c_version.h
instead ofjson.h
for detecting json-c.