# Third-party dependency aggregation. Keep vendor projects under this layer so
# the root CMakeLists stays focused on the final executable.

add_subdirectory(mosquitto)

file(GLOB THIRD_PARTY_ZLOG_SOURCES
    ${CMAKE_CURRENT_SOURCE_DIR}/zlog/src/*.c
)

list(FILTER THIRD_PARTY_ZLOG_SOURCES EXCLUDE REGEX "zlog-chk-conf\\.c$")
list(FILTER THIRD_PARTY_ZLOG_SOURCES EXCLUDE REGEX "zlog_win\\.c$")

set(THIRD_PARTY_SOURCES
    ${THIRD_PARTY_ZLOG_SOURCES}
    ${CMAKE_CURRENT_SOURCE_DIR}/cjson/cJSON.c
    PARENT_SCOPE
)

set(THIRD_PARTY_INCLUDE_DIRS
    ${CMAKE_CURRENT_SOURCE_DIR}/zlog/src
    ${CMAKE_CURRENT_SOURCE_DIR}/mosquitto/include
    ${CMAKE_CURRENT_SOURCE_DIR}/mosquitto/lib
    ${CMAKE_CURRENT_SOURCE_DIR}/cjson
    PARENT_SCOPE
)
