Skip to content

Commit

Permalink
Fix Zephyr example.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed May 6, 2024
1 parent 06a7812 commit 60350f3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ if(CONFIG_WOLFMQTT)
FILE(GLOB wolfmqtt_sources ${ZEPHYR_CURRENT_MODULE_DIR}/src/*.c)
target_sources(app PRIVATE ${wolfmqtt_sources})
add_definitions(-DWOLFMQTT_ZEPHYR)

if(CONFIG_WOLFMQTT_SETTINGS_FILE)
target_compile_definitions(wolfmqtt INTERFACE
WOLFMQTT_SETTINGS_FILE="${CONFIG_WOLFMQTT_SETTINGS_FILE}"
)
endif()
endif()
5 changes: 5 additions & 0 deletions zephyr/samples/client/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
extern "C" {
#endif

/* If a custom user_settings file is provided use it instead */
#ifdef WOLFMQTT_SETTINGS_FILE
#include WOLFMQTT_SETTINGS_FILE
#endif

#undef NO_FILESYSTEM
#define NO_FILESYSTEM

Expand Down
5 changes: 3 additions & 2 deletions zephyr/samples/client_tls/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
extern "C" {
#endif

#ifdef CONFIG_WOLFSSL_SETTINGS_FILE
#include CONFIG_WOLFSSL_SETTINGS_FILE
/* If a custom user_settings file is provided use it instead */
#ifdef WOLFMQTT_SETTINGS_FILE
#include WOLFMQTT_SETTINGS_FILE
#endif

#undef NO_FILESYSTEM
Expand Down

0 comments on commit 60350f3

Please sign in to comment.