hardinfo
hardinfo copied to clipboard
Trouble building on Fedora
Had some trouble building this on fedora, the json-glib is in this folder
/usr/include/json-glib-1.0/json-glib/json-glib.h
the include in bench_results.c fails.
Fixed by adding this to the cmakelists
include_directories(/usr/include/json-glib-1.0/)
ran into #551 as well, fixed by manual linking
target_link_libraries(benchmark json-glib-1.0)
Having same issue about json-glibs on Ubuntu 18.04.4, already make sure that libjson-glib-dev
is installed.
.... /hardinfo/modules/benchmark/bench_results.c:22:10: fatal error: json-glib/json-glib.h: No such file or directory #include <json-glib/json-glib.h> ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/benchmark.dir/build.make:62: recipe for target 'CMakeFiles/benchmark.dir/modules/benchmark.c.o' failed
@LWSS solution by adding these lines to CMakeLists.txt work for me, thanks!
include_directories(/usr/include/json-glib-1.0/)
Installing the dev package did the trick for me on 20.04.3