diff --git a/README.md b/README.md index 2943801..6984484 100644 --- a/README.md +++ b/README.md @@ -96,8 +96,30 @@ int main(int argc, char* argv[]) { ## Installation +### Integrate source code to your project + Just copy `nanomodbus.c` and `nanomodbus.h` inside your application codebase. +### CMake project + +nanomodbus supports library linking by using cmake. + +```cmake +FetchContent_Declare( + nanomodbus + GIT_REPOSITORY https://github.com/debevv/nanoMODBUS + GIT_TAG master # or the version you want + GIT_SHALLOW TRUE +) + +FetchContent_MakeAvailable(nanomodbus) + +... + +add_executable(your_program source_codes) +target_link_libraries(your_program nanomodbus) +``` + ## API reference API reference is available in the repository's [GitHub Pages](https://debevv.github.io/nanoMODBUS/nanomodbus_8h.html).