diff options
author | Thomas Gstädtner <thomas@gstaedtner.net> | 2013-03-05 04:30:51 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-03-05 13:44:48 +0400 |
commit | 49e6e062b8effe281a85de167c16c5f039b74442 (patch) | |
tree | ea1b577e948a83be1f6e39daeefaf0d4ae45da80 /CMakeLists.txt | |
parent | b2010c706c85c621d5795304fd94711eb400321a (diff) |
add pkgconfig support for json-c
this includes a fallback for legacy support
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 941fd8e..f8388ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,13 @@ IF(APPLE) LINK_DIRECTORIES(/opt/local/lib) ENDIF() +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(JSONC json) +IF(JSONC_FOUND) + ADD_DEFINITIONS(-DJSONC) + INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) +ENDIF() + SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c ustream.c ustream-fd.c vlist.c utils.c) ADD_LIBRARY(ubox SHARED ${SOURCES}) |