A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/open-source-parsers/jsoncpp/issues/455 below:

Usage of the jsoncpp CMake package · Issue #455 · open-source-parsers/jsoncpp · GitHub

Dear jsoncpp developers,

I tried to use the CMake package built by jsoncpp (and provided by libjsoncpp-dev on Debian / Ubuntu) on a CMake project depending on it.

I tried the following discovery via CMake config mode:

find_package(jsoncpp REQUIRED)
include_directories(${jsoncpp_INCLUDE_DIRS})
link_libraries(${jsoncpp_LIBRARIES})

But it does not seem to work. I then ran the the following test:

cmake_minimum_required(VERSION 2.6.2)
project(jsoncpp_test)

find_package(jsoncpp REQUIRED)
message("FOUND CONFIG: ${jsoncpp_CONFIG}")
message("INCLUDE DIRS: ${jsoncpp_INCLUDE_DIRS}")
message("LIBRARIES: ${jsoncpp_LIBRARIES}")

which produced the following output:

FOUND CONFIG: /usr/lib/x86_64-linux-gnu/cmake/jsoncpp/jsoncppConfig.cmake
INCLUDE DIRS: 
LIBRARIES: 

meaning the CMake package file is found but none of the expected variables is set.

How are we expected to discover and use jsoncpp under CMake then? FYI, using pkg-config works fine, but is not what I would consider a solution.

Many thanks,
Ghis

gnthibault, jimmyyukio and frankyueT


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4