This one sucked
- Build jsoncpp
git clone https://github.com/open-source-parsers/jsoncpp.git; (cd jsoncpp && mkdir build)
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON -G "Unix Makefiles" ../; make; make install
- Know: The static lib is called
jsoncpp_static
and the shared isjsoncpp_lib
. smh. - In your CMakeLists.txt do a
find_package(jsoncpp REQUIRED)
- And then do a
target_link_libraries(your_lib
jsoncpp_lib
)