Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ project(tinydtls)

include (AutoConf.cmake)

option(BUILD_SHARED_LIBS "Link using shared libs" OFF)
if(NOT ZEPHYR_BASE)
option(BUILD_SHARED_LIBS "Link using shared libs" OFF)
else()
# provided by the zephyr build system
endif()

option(make_tests "Make test programs and examples" OFF)

if(NOT PLATFORM)
Expand All @@ -38,8 +43,13 @@ set(PACKAGE_NAME "tinydtls")
set(PACKAGE_VERSION "0.8.6" )
set(SOVERSION "0" )

option(DTLS_ECC "disable/enable support for TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8" ON )
option(DTLS_PSK "disable/enable support for TLS_PSK_WITH_AES_128_CCM_8" ON)
if(NOT ZEPHYR_BASE)
option(DTLS_ECC "disable/enable support for TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8" ON )
option(DTLS_PSK "disable/enable support for TLS_PSK_WITH_AES_128_CCM_8" ON)
else()
# provided by zephyr/CMakeLists.txt and zephyr/Kconfig
endif()

option(WARNING_TO_ERROR "force all compiler warnings to be errors" OFF)

configure_file(dtls_config.h.cmake.in dtls_config.h )
Expand Down
2 changes: 2 additions & 0 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ if(CONFIG_LIBTINYDTLS)
if(${ARCH} STREQUAL "arm")
set(CMAKE_C_BYTE_ORDER LITTLE_ENDIAN)
endif()
# replaces the option DTLS_PSK
if(CONFIG_LIBTINYDTLS_PSK)
set(DTLS_PSK On)
else()
set(DTLS_PSK Off)
endif()
# replaces the option DTLS_ECC
if(CONFIG_LIBTINYDTLS_ECDHE_ECDSA)
set(DTLS_ECC On)
else()
Expand Down