Skip to content

Commit 22fc4b3

Browse files
committed
Add a cmake-file that can be included from Pico-SDK-based project to use jsoncpp as an interface library
1 parent bd25fc5 commit 22fc4b3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

interfaceLibForPicoSDK.cmake

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Include this file if you want to use the jsoncpp library
2+
## in YOUR (Pico) project.
3+
4+
cmake_minimum_required(VERSION 3.12)
5+
6+
# Define the jsoncpp library
7+
add_library(jsoncpp INTERFACE)
8+
9+
target_sources(jsoncpp INTERFACE
10+
${CMAKE_CURRENT_LIST_DIR}/src/lib_json/json_reader.cpp
11+
${CMAKE_CURRENT_LIST_DIR}/src/lib_json/json_value.cpp
12+
${CMAKE_CURRENT_LIST_DIR}/src/lib_json/json_writer.cpp
13+
)
14+
15+
target_include_directories(jsoncpp INTERFACE
16+
${CMAKE_CURRENT_LIST_DIR}/include/
17+
)

0 commit comments

Comments
 (0)