Add to your conanfile.txt:
[requires]
jsonfusion/1.0.1
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layoutIn your CMakeLists.txt:
find_package(JsonFusion REQUIRED CONFIG)
target_link_libraries(your_target JsonFusion::JsonFusion)
target_compile_features(your_target PUBLIC cxx_std_23)Install and build:
conan install . --output-folder=build --build=missing
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=build/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build buildFrom the JsonFusion root:
conan create . --build=missing --test-folder=packaging/conan/test_packageThe version is automatically extracted from include/JsonFusion/version.hpp.
Update only include/JsonFusion/version.hpp:
#define JSONFUSION_VERSION "0.720.0"Then conan create . will automatically use the new version.
- Create a GitHub release:
git tag v1.0.1 && git push origin v1.0.1 - Fork conan-center-index
- Follow their contribution guide
- Submit a pull request
conan remote add myremote <url>
conan remote login myremote
conan upload jsonfusion/1.0.1 -r=myremote --all- Conan 2.x:
pip install conan - C++23 compatible compiler (GCC 14+)
For a complete working example, see packaging/conan/example/ directory.