diff mbox

[OpenWrt-Devel] ubox: CMake: fix json-c detection

Message ID 1430165622-26787-1-git-send-email-yegorslists@googlemail.com
State Accepted
Headers show

Commit Message

Yegor Yefremov April 27, 2015, 8:13 p.m. UTC
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>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafał Miłecki April 27, 2015, 9:14 p.m. UTC | #1
On 27 April 2015 at 22:13, Yegor Yefremov <yegorslists@googlemail.com> wrote:
> 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.

Just wanted to say thanks. I remember I got some problems with finding
json-c when trying to install ubox on my PC. Guess it was it.
diff mbox

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8e8945..b2c062b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@  IF(APPLE)
 ENDIF()
 
 INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(JSONC json-c json)
+PKG_SEARCH_MODULE(JSONC json-c json)
 IF(JSONC_FOUND)
   ADD_DEFINITIONS(-DJSONC)
   INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS})