yosh-matsuda/cpp-yyjson

Installation

Closed this issue · 2 comments

Hi,
could you add more details about the installation ?
i'm not familiar with cmake but i have no idea where i should place your stuff once i get vcpkg and dependencies installed without error
i clone your repo and naively tried
image

i've also tried to use jsoncpp
and i installed it via vcpkg, i just had to add the "-Ivcpkg/packages/jsoncpp_x64-linux/include"
in my makefile rules and it was good to go

am i missing something ?
maybe should i clone your repo in the vcpkg/package folder ?

@RemiBraizet Hi.

You need to set CMAKE_TOOLCHAIN_FILE to CMake when you use the libraries via. vcpkg.

Install the dependencies:

$ ./vcpkg install yyjson fmt nameof

Then, set the path to the toolchain file:

$ cmake -DCMAKE_TOOLCHAIN_FILE:STRING=<PATH_TO_VCPKG>/scripts/buildsystems/vcpkg.cmake -B build -S .

Another method is to add the vcpkg include directories of yyjson, fmt, and nameof to your Makefile as you did for jsoncpp.

hi,
i wasnt familiar with cmake, but i got it working importing the directories of yyjson fmt and nameof
thanks