1
0
Fork 0

Use pkgconfig to find tinycbor

This commit is contained in:
Shawn Nock 2019-05-08 15:09:10 +00:00
parent 8cab0c7082
commit a76382c2bb
1 changed files with 5 additions and 2 deletions

View File

@ -25,7 +25,10 @@ if (DO_UPLOAD_SHA)
target_sources(umcumgr PRIVATE src/sha256.c) target_sources(umcumgr PRIVATE src/sha256.c)
endif () endif ()
find_library(TINYCBOR_LIB tinycbor /usr/local/lib /usr/lib) find_package(PkgConfig)
target_link_libraries(umcumgr ${TINYCBOR_LIB})
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) install(TARGETS umcumgr DESTINATION bin)