From 7d10656658982444db66d809d83a5b3e657236e9 Mon Sep 17 00:00:00 2001 From: omdxp Date: Sat, 20 Apr 2024 09:18:07 +0200 Subject: [PATCH] update c readme --- README.md | 2 +- c/README.md | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 922a6da..c1bfb62 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ You can find more about each language by clicking on the language name | [Java](./java) | n/a | n/a | n/a | n/a | | [C#](./csharp) | n/a | n/a | n/a | n/a | | [Rust](./rust) | WIP | WIP | WIP | n/a | -| [C](./c) | WIP | WIP | WIP | n/a | +| [C](./c) | `kuliya/1.0.0` | ![](https://github.com/dzcode-io/kuliya/actions/workflows/c-checks.yml/badge.svg) | WIP | n/a | ## Contributing diff --git a/c/README.md b/c/README.md index 42113c2..757f72d 100644 --- a/c/README.md +++ b/c/README.md @@ -2,6 +2,41 @@ Algeria's college hierarchy dataset as a C library +# Installation + +You can use `kuliya` library with one of these 2 options: + +1. Build it locally as it shown in [Get Started](#get-started) section then copy `kuliya.h` and `data.h` to your project. + +2. Use conan package manager in your CMake project by followin these steps: + - Add `kuliya` recipe to your `conanfile.txt`: + ``` + [requires] + kuliya/1.0.0 + + [generators] + CMakeDeps + CMakeToolchain + ``` + - Install the recipe with conan: + ```sh + conan install . --output-folder=build --build=missing + ``` + - Update your `CMakeLists.txt` file accordingly: + ```cmake + cmake_minimum_required(VERSION 3.15) + project(sandbox C) + + find_package(kuliya REQUIRED) + + add_executable(${PROJECT_NAME} src/main.c) + + target_link_libraries(${PROJECT_NAME} kuliya::kuliya) + ``` + - Build and run your executable. + +You can check the usage [here](#usage). + # Prerequisites - [CMake](https://cmake.org/download/) build system (minimum required version 3.19)