include(FetchContent) if(NOT TARGET yyjson) FetchContent_Declare( yyjson GIT_REPOSITORY https://github.com/ibireme/yyjson.git GIT_TAG 0.12.0 ) FetchContent_MakeAvailable(yyjson) endif() # Provide an imported target if not already available if(NOT TARGET yyjson::yyjson) add_library(yyjson::yyjson ALIAS yyjson) endif() # Mark yyjson as found for find_package compatibility set(yyjson_FOUND TRUE)