mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-08-09 15:44:42 +02:00
Created Using the library in a CMake project (markdown)
25
Using-the-library-in-a-CMake-project.md
Normal file
25
Using-the-library-in-a-CMake-project.md
Normal file
@@ -0,0 +1,25 @@
|
||||
All you need to write a `CMakeLists.txt` like this one:
|
||||
|
||||
```CMake
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(Server)
|
||||
|
||||
add_subdirectory(ArduinoJson/src)
|
||||
|
||||
add_executable(server
|
||||
server.c
|
||||
)
|
||||
|
||||
target_link_libraries(server ArduinoJson)
|
||||
```
|
||||
|
||||
Then just call:
|
||||
|
||||
```shell
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
|
||||
See issue [#188](https://github.com/bblanchon/ArduinoJson/issues/188)
|
Reference in New Issue
Block a user