OPTION(BUILD_EXAMPLES "build examples" ON)
INCLUDE(FindPkgConfig)
-PKG_SEARCH_MODULE(JSONC json-c)
-IF(JSONC_FOUND)
- ADD_DEFINITIONS(-DJSONC)
- INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})
-ENDIF()
+PKG_SEARCH_MODULE(JSONC json-c REQUIRED)
+INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})
SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c ustream.c ustream-fd.c vlist.c utils.c safe_list.c runqueue.c md5.c kvlist.c ulog.c base64.c udebug.c udebug-remote.c)
#include "blobmsg.h"
#include "blobmsg_json.h"
-#ifdef JSONC
- #include <json.h>
-#else
- #include <json/json.h>
-#endif
+#include <json.h>
bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
{
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifdef JSONC
- #include <json.h>
-#else
- #include <json/json.h>
-#endif
-
+#include <json.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>