diff --git a/cmake/Modules/FindJSONC.cmake b/cmake/Modules/FindJSONC.cmake index f72e8ea1..0b29a102 100644 --- a/cmake/Modules/FindJSONC.cmake +++ b/cmake/Modules/FindJSONC.cmake @@ -6,8 +6,8 @@ # JSONC_INCLUDE_DIR - The JSON-C include directory. # JSONC_LIBRARY - The JSON-C library to link against. -FIND_PATH(JSONC_INCLUDE_DIR json/json.h) -FIND_LIBRARY(JSONC_LIBRARY NAMES json) +FIND_PATH(JSONC_INCLUDE_DIR json.h PATH_SUFFIXES json json-c) +FIND_LIBRARY(JSONC_LIBRARY NAMES json json-c) IF (JSONC_INCLUDE_DIR AND JSONC_LIBRARY) SET(JSONC_FOUND TRUE) diff --git a/libgrive/CMakeLists.txt b/libgrive/CMakeLists.txt index 3cc15742..87032bb0 100644 --- a/libgrive/CMakeLists.txt +++ b/libgrive/CMakeLists.txt @@ -41,6 +41,7 @@ include_directories( ${libgrive_SOURCE_DIR}/src ${libgrive_SOURCE_DIR}/test ${GDBM_INCLUDE_DIR} + ${JSONC_INCLUDE_DIR} ${OPT_INCS} ) diff --git a/libgrive/src/protocol/Json.cc b/libgrive/src/protocol/Json.cc index 4c115d6a..5abeaf26 100644 --- a/libgrive/src/protocol/Json.cc +++ b/libgrive/src/protocol/Json.cc @@ -29,8 +29,8 @@ #pragma warning(push) #pragma warning(disable: 4005) #endif -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(pop) #endif