地址:https://blog.csdn.net/weixin_40448140/article/details/109111042
#CMakelist.txt
# cmake_minimum_required(VERSION <specify CMake version here>)
cmake_minimum_required(VERSION 3.19)
project(untitled)
set(CMAKE_CXX_STANDARD 14)
find_package(jsoncpp CONFIG REQUIRED)
add_executable(untitled main.cpp)
target_link_libraries(untitled PRIVATE jsoncpp_object jsoncpp_static)
#cmake opotion
-DCMAKE_TOOLCHAIN_FILE=/home/wyatt/vcpkg/scripts/buildsystems/vcpkg.cmake