ubox: CMake: fix json-c detection
Use PKG_SEARCH_MODULE() to detect json-c library, otherwise the search fails, if both json-c and json are not present in pkg-config database. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
This commit is contained in:
parent
a8e70c6d36
commit
791a361ad1
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
|
||||||
OPTION(BUILD_LUA "build Lua plugin" ON)
|
OPTION(BUILD_LUA "build Lua plugin" ON)
|
||||||
|
|
||||||
INCLUDE(FindPkgConfig)
|
INCLUDE(FindPkgConfig)
|
||||||
PKG_CHECK_MODULES(JSONC json-c)
|
PKG_SEARCH_MODULE(JSONC json-c)
|
||||||
IF(JSONC_FOUND)
|
IF(JSONC_FOUND)
|
||||||
ADD_DEFINITIONS(-DJSONC)
|
ADD_DEFINITIONS(-DJSONC)
|
||||||
INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})
|
INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})
|
||||||
|
|
Loading…
Reference in a new issue