Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

External yyjson and REFLECTCPP_USE_BUNDLED_DEPENDENCIES=OFF does not work #433

Closed

Description

@rath3t

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 https://github.com/getml/reflect-cpp/blob/f86cdb5ca3ecb0b533552cbe12955c6f4ed2a3eb/CMakeLists.txt#L172

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.

Activity

  1. liuzicheng1987 commented on May 9, 2025

    @liuzicheng1987
    Collaborator

    @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.

  2. Urfoex commented on May 12, 2025

    @Urfoex
    Collaborator

    @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)

  3. rath3t commented on May 12, 2025

    @rath3t
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions