diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..0a84acd9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "thirdparty/tinycbor"] + path = thirdparty/tinycbor + url = https://github.com/intel/tinycbor.git diff --git a/.travis.yml b/.travis.yml index 8a954adc..2b3d531b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_install: - sudo apt install valgrind -y - make install-cmocka - make install-mbedtls - - make install-tinycbor + # - make install-tinycbor script: # Link gcc-9 and g++-9 to their standard commands diff --git a/CMakeLists.txt b/CMakeLists.txt index be9f1e42..ce529fe1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "CI") list(APPEND flags -std=c17 -Wall -Wextra -Werror -pedantic -I/home/travis/build/RTradeLtd/libcp2p/destdir/usr/include/ -I /home/travis/build/RTradeLtd/libcp2p/tinycbor -I/usr/local/lib/libtinycbor.so.0.5 -I/usr/local/lib) # override the previous C compiler choice set(CMAKE_C_COMPILER /usr/bin/gcc-9) + include(cmake/thirdparty/tinycbor.cmake) endif() diff --git a/cmake/thirdparty/tinycbor.cmake b/cmake/thirdparty/tinycbor.cmake new file mode 100644 index 00000000..33073ce6 --- /dev/null +++ b/cmake/thirdparty/tinycbor.cmake @@ -0,0 +1,12 @@ +file(GLOB_RECURSE TINYCBOR_SOURCES + ${PROJECT_SOURCE_DIR}/thirdparty/tinycbor/src/*.h + ${PROJECT_SOURCE_DIR}/thirdparty/tinycbor/src/*.c +) + +add_library(tinycbor + SHARED + ${TINYCBOR_SOURCES} +) + + + diff --git a/thirdparty/tinycbor b/thirdparty/tinycbor new file mode 160000 index 00000000..085ca407 --- /dev/null +++ b/thirdparty/tinycbor @@ -0,0 +1 @@ +Subproject commit 085ca40781f7c39febe6d14fb7e5cba342e1804b