joerg-krause writes
Looks like the distros install the header files in different directories. Ubuntu installs them in /usr/include/jsoncpp/json/
by passing -DINCLUDE_INSTALL_DIR=/usr/include/jsoncpp
to CMake whereas Arch Linux installs them /usr/include/json/
without passing INCLUDE_INSTALL_DIR
to CMake.
I would suggest to use pkg-config which should work in both cases.
medoc92 writes
are you sure that you have up to date source ? This is weird, because this was already found out and the current configure.ac has a check for the include files in both places:
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS(json/json.h jsoncpp/json/json.h)
LIBS="$LIBS -ljsoncpp"
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#ifdef HAVE_JSONCPP_JSON_JSON_H
#include <jsoncpp/json/json.h >
#else
#include <json/json.h >
#endif]], [Json::Features dummy])],
[HAVE_JSONCPP=1],
[AC_MSG_ERROR([libjsoncpp not found.])])
AC_LANG_POP
joerg-krause writes
That’s it! Had not applied aba96db0cfe8a2e5c825f4448c0ad184e21b50e1 to version 1.2.2.