formula: add DaveGamble/cJSON - #504
MeteorsLiu wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Reviewed the complete fixed diff for the cJSON formula, including the Conan-derived build/install contract, option handling, pkg-config metadata, and consumer test. The Unix paths are consistent with the installed layout; the shared Windows consumer test needs one runtime-path correction noted inline.
| if target.options["shared"][0] == "ON" { | ||
| os.setenv("LD_LIBRARY_PATH", filepath.join(installDir, "lib"))! | ||
| os.setenv("DYLD_LIBRARY_PATH", filepath.join(installDir, "lib"))! | ||
| } |
There was a problem hiding this comment.
[P1] Add the Windows DLL directory to the test PATH
When shared=ON on Windows, the CMake install rules place the DLL in installDir/bin via the RUNTIME DESTINATION added above, while this test executable is created under _llar_consumer. The test only sets LD_LIBRARY_PATH and DYLD_LIBRARY_PATH, neither of which Windows uses, so exec! binary fails with a missing cjson.dll/cjson_utils.dll even though the build and link succeeded. Add installDir/bin to PATH for the Windows branch (preserving the existing PATH) before executing the consumer.
Summary
Add an idiomatic LLAR Formula for DaveGamble/cJSON from the pinned Conan Center recipe. The formula preserves the v1.7.12 floor, Conan build options, v1.7.12 install patch behavior, optional cJSON_Utils output, and relocatable pkg-config metadata.
Validation
Validated with the exact LLAR main revision 9c062aa5c4b1724bfd30cb72f7e0bda136f9c078 on Darwin arm64: v1.7.12, v1.7.18, v1.7.19, utils, shared, fPIC/locales selections, cache-hit consumer testing, and rejection below the v1.7.12 floor.
Closes #253