diff --git a/CMakeLists.txt b/CMakeLists.txt index 306a932..3a8d938 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,10 @@ if (DO_UPLOAD_SHA) target_sources(umcumgr PRIVATE src/sha256.c) endif () -find_library(TINYCBOR_LIB tinycbor /usr/local/lib /usr/lib) -target_link_libraries(umcumgr ${TINYCBOR_LIB}) +find_package(PkgConfig) + +PKG_CHECK_MODULES(CBOR REQUIRED tinycbor) +target_include_directories(umcumgr PRIVATE ${CBOR_INCLUDE_DIRS}) +target_link_libraries(umcumgr PRIVATE ${CBOR_LIBRARIES}) install(TARGETS umcumgr DESTINATION bin) \ No newline at end of file