Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing build #9

Merged
merged 2 commits into from
Sep 30, 2024
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
48 changes: 24 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,38 +53,38 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build mbed TLS shared library.")
add_subdirectory(external/mbedtls)
target_link_libraries(bytebeam_firmware_sdk mbedtls mbedx509 mbedcrypto)

# examples/
# Install rules for SDK and example
install(TARGETS bytebeam_firmware_sdk
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include
)

# Build the examples if host is Windows
if(WIN32)
set(PLATFORM_SOURCES platform/Win32/platform_win32_port.c)

target_include_directories(bytebeam_firmware_sdk PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/platform/Win32
${CMAKE_CURRENT_SOURCE_DIR}/portable
${CMAKE_CURRENT_SOURCE_DIR}/include/bytebeam
)
else()
set(PLATFORM_SOURCES "")
endif()

# Create an example executable for bytebeam_stream_publish
add_executable(bytebeam_stream_publish
examples/bytebeam_stream_publish.c
${PLATFORM_SOURCES}
)
add_executable(bytebeam_stream_publish
examples/bytebeam_stream_publish.c
${PLATFORM_SOURCES}
)

# Link the example with the SDK library
target_link_libraries(bytebeam_stream_publish bytebeam_firmware_sdk)
target_link_libraries(bytebeam_stream_publish bytebeam_firmware_sdk)

# Set the output directory for the example executable
set_target_properties(bytebeam_stream_publish PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/examples"
)
set_target_properties(bytebeam_stream_publish PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/examples"
)

# Install rules for SDK and example
install(TARGETS bytebeam_firmware_sdk
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include
)
install(TARGETS bytebeam_stream_publish
RUNTIME DESTINATION bin
)
install(TARGETS bytebeam_stream_publish
RUNTIME DESTINATION bin
)

else()
set(PLATFORM_SOURCES "")
endif()
6 changes: 0 additions & 6 deletions config/core_mqtt_config.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#ifndef CORE_MQTT_CONFIG_H
#define CORE_MQTT_CONFIG_H

#include <stdio.h>

#define LogError(message) printf("Error: %s\n", message)
#define LogWarn(message) printf("Warning: %s\n", message)
#define LogInfo(message) printf("Info: %s\n", message)

#define MQTT_STATE_ARRAY_MAX_COUNT (10U)

#define MQTT_MAX_CONNACK_RECEIVE_RETRY_COUNT (2U)
Expand Down