Skip to content

Commit

Permalink
TODO add wakaama static library
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasWoodtli committed Sep 4, 2024
1 parent 348370c commit f051ef2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions wakaama.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,30 @@ function(target_sources_shared target)
target_include_directories(${target} PUBLIC ${WAKAAMA_EXAMPLE_SHARED_DIRECTORY})
endfunction()


# Wakaama library
# Static library that users of Wakaama can link against
add_library(wakaama_static STATIC)
target_sources_wakaama(wakaama_static)
target_include_directories(wakaama_static PUBLIC ${WAKAAMA_TOP_LEVEL_DIRECTORY}/include/)

if(WAKAAMA_TRANSPORT STREQUAL POSIX_UDP)
target_link_libraries(wakaama_static PUBLIC wakaama_transport_posix_udp)
elseif(WAKAAMA_TRANSPORT STREQUAL TINYDTLS)
target_link_libraries(wakaama_static PUBLIC wakaama_transport_tinydtls)
endif()

if(WAKAAMA_PLATFORM STREQUAL POSIX)
target_link_libraries(wakaama_static PUBLIC wakaama_platform_posix)
endif()

if(WAKAAMA_COMMAND_LINE)
target_link_libraries(wakaama_static PUBLIC wakaama_command_line)
endif()




# Enforce a certain level of hygiene
add_compile_options(
-Waggregate-return
Expand Down

0 comments on commit f051ef2

Please sign in to comment.