Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake does not find libjsoncpp on debian sid #30

Closed
xrmx opened this issue Mar 1, 2016 · 2 comments
Closed

cmake does not find libjsoncpp on debian sid #30

xrmx opened this issue Mar 1, 2016 · 2 comments

Comments

@xrmx
Copy link

xrmx commented Mar 1, 2016

Hello,

on debian sid with libjsoncpp-dev 1.6.5 installed cmake doesn't find it:

- Could NOT find libjsoncpp (missing:  LIBJSONCPP_INCLUDE_DIR) 

Looking at the cmake module it looks like it's looking for libjsoncpp but here it's called jsoncpp:

$ pkg-config --cflags jsoncpp
-I/usr/include/jsoncpp

Tried cooking this patch but does not help:

diff --git a/cmake/Modules/Findjsoncpp.cmake b/cmake/Modules/Findjsoncpp.cmake
index 4857396..c0dfbce 100644
--- a/cmake/Modules/Findjsoncpp.cmake
+++ b/cmake/Modules/Findjsoncpp.cmake
@@ -6,12 +6,12 @@
 #  LIBJSONCPP_DEFINITIONS - Compiler switches required for using libjsoncpp

 find_package(PkgConfig)
-pkg_check_modules(PC_LIBJSONCPP QUIET libjsoncpp)
+pkg_check_modules(PC_LIBJSONCPP QUIET jsoncpp)
 set(LIBJSONCPP_DEFINITIONS ${PC_LIBJSONCPP_CFLAGS_OTHER})

 find_path(LIBJSONCPP_INCLUDE_DIR json.h
           HINTS ${PC_LIBJSONCPP_INCLUDEDIR} ${PC_LIBJSONCPP_INCLUDE_DIRS}
-          PATH_SUFFIXES libjsoncpp)
+          PATH_SUFFIXES jsoncpp)

 find_library(LIBJSONCPP_LIBRARY jsoncpp
              HINTS ${PC_LIBJSONCPP_LIBDIR} ${PC_LIBJSONCPP_LIBRARY_DIRS} )
@fernandezcuesta
Copy link

I managed to find it with the patch described in #8

@mdlincoln mdlincoln mentioned this issue Apr 4, 2016
@magwyz magwyz closed this as completed Nov 7, 2016
@xrmx
Copy link
Author

xrmx commented Nov 7, 2016

@magwyz has this been fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants