Git Product home page Git Product logo

conan-jsoncpp's Introduction

Download Build Status Build status

conan-jsoncpp

Conan.io package for jsoncpp library

The packages generated with this conanfile can be found in bintray.

Build packages

$ pip install conan_package_tools
$ python build.py

Reuse the packages

basic setup

$ conan install jsoncpp/1.9.0@theirix/stable

Prerequirements

JsonCpp needs at least cmake 3.12 for building.
If you do not have one, specify flag jsoncpp:use_cmake_installer=True

Project setup

If you handle multiple dependencies in your project is better to add a conanfile.txt

[requires]
jsoncpp/1.9.0@theirix/stable

[options]
jsoncpp:shared=true # false

[generators]
txt
cmake

Complete the installation of requirements for your project running:

conan install . 

Project setup installs the library (and all his dependencies) and generates the files conanbuildinfo.txt and conanbuildinfo.cmake with all the paths and variables that you need to link with your dependencies.

conan-jsoncpp's People

Contributors

jgsogo avatar kinddragon avatar memsharded avatar theirix avatar uilianries avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

conan-jsoncpp's Issues

Link error with MSVC 14

After installing the latest version by adding the package in the conanfile.txt, I tried to build a simple main.cpp (it only includes <json/json.h> and tries to declare a Json::Value inside main() ). The compiler can't find the implementation of the type, even though it seems to link correctly with the library.

The compiler output is here: http://pastebin.com/yReM30xK

My environment is Visual Studio 2015 Enterprise Update 2, Windows 10 Anniversary, CMake 3.5.0-rc1, conan 0.13.2, jsoncpp 1.7.7

Use cmake as build_require

Hi @theirix

In your recipe:

def requirements(self):
        if self.options.use_cmake_installer:
            self.requires.add("cmake_installer/0.1@lasote/stable", private=False)

Having use_cmake_installer as an option, generates a different package ID.
For this purpose you better use build_requires which can be declared in the recipe, or in this case, I would assume that most people building this will have it installed in the system, or can manage it as a build_require in their conan profiles

Support version 1.0.0

Hi @theirix !

I need to use jsonrpc-cpp 0.5 for a legacy project. I just created a Conan recipe to solve it, but it uses jsoncpp 1.0.0. The newest version raises error during compile time "[JSONCPP_DEPRECATED]".

To solve cppjson, I created the support to 1.0.0. I would like to create a PR, but first would need that you create testing/1.0.0 branch.

Check my branch here

Regards!

building package and missing files

Hi,

When trying to use conan-jsoncpp, I saw that cmake config files are not packaged. It would mke the reuse of the binary packages a lot easier in some cases, as being more cmake-friendly. So :

  • is it the expected behaviour ?
  • should the files be conanly-copied when packaging ?
  • or should the package step of conanfile use some cmake.install() helper ?

Can gladly submit a PR if asked

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.