Open PhoebeHui opened 4 years ago
hi, @PhoebeHui!
i try to use vcpkg in cmake for yajl
find_package(yajl CONFIG REQUIRED) target_link_libraries(my_project PRIVATE yajl_s)
but it is cant find package. Do you have some instructions to use yajl with cmake ?
@CreatorSergey, sorry for late response!
Yajl doesn't export cmake config and target file, so you can't find the package via find_package, you can use find_path and find_library instead. See https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/installing-and-using-packages.md?plain=1#LL183C1-L183C1
yajl is available as a port in VCPKG , documenting the install process here will help users get started by providing a single set of commands to build yajl, ready to be included in their projects.
VCPKG is a C++ library manager that simplifies installation for yajl and other project dependencies, we also test whether our library ports build in various configurations (dynamic, static) on various platforms (OSX, Linux, Windows: x86, x64, UWP, ARM) to keep a wide coverage for users.
I'm a maintainer for vcpkg, and here is what the port script looks like. We try to keep the library maintained as close as possible to the original library.