Third-party libraries which can be included in MuditaOS builds for each and every target
Please mind that we are using CMake library encapsulation technique where we:
awesome-library for library name in this example:include catalog i.e. under: include/awseome-library/awesome-library.hppadd_library(awesome-library INTERFACE)
add_library(awesome::library::alias ALIAS awesome-library)
target_include_directories(awesome-library INTERFACE include/)
NOTE: You can check out how sml-utils cmake and catalogs are created
Please note:
awesome-library in use here.PRIVATE in cmake sections while adding sourcesHow to create the target depends on library, exemplary cmake example can look like that:
add_library(awesome-library)
target_sources(awesome-library
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/awesome-library.c
${CMAKE_CURRENT_SOURCE_DIR}/src/awesome-library.h
)
target_include_directories(awesome-library
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
)
add_library(awesome::library ALIAS awesome-library)
Where in src there is awesome-library/awesome-library.hpp header