E840 External yyjson and REFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF does not work · Issue #433 · getml/reflect-cpp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

External yyjson and REFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF does not work #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rath3t opened this issue May 9, 2025 · 3 comments
Closed

Comments

@rath3t
Copy link
rath3t commented May 9, 2025

Thanks for this nice library!
I want to use the incremental feature from yyjson 0.11.0. Therefore, I downloaded it and wanted to link to reflect-cpp with REFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF.

The problem is yyjson does not export a target yyjson::yyjson as assumed in

if (NOT TARGET yyjson::yyjson)

but just a plain yyjson, see https://ibireme.github.io/yyjson/doc/doxygen/html/building-and-testing.html#use-cmake-as-a-dependency

Therefore, this has to be fixed here or yyjson should export the target in a more best practice style.

@liuzicheng1987
Copy link
Contributor

@rath3t could you try to use vcpkg to download YYJSON 0.11.0?

The reason we do it the way we do it is because that is what is expected when we use package managers like Conan and vcpkg.

@Urfoex
Copy link
Collaborator
Urfoex commented May 12, 2025

@rath3t
You could also try to set an ALIAS between yyjson and reflectcpp find_package in your CMakeLists.txt, e.g.
add_library(yyjson::yyjson ALIAS yyjson)

@rath3t
Copy link
Author
rath3t commented May 12, 2025

Thanks for you comments. @Urfoex thsts what Im currently doing,
but I consider it that a bug in the cmake file, thats why I filed the issue.
Unfortunately, the conan receipe https://github.com/conan-io/conan-center-index/blob/master/recipes%2Fyyjson%2Fall%2Fconanfile.py#L68 defines a different target then the original library and why vcpkg also creates this different target with a namespace preprended I dont know. But maybe I misunderstood the mechanism you use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0