
1. qcloud has a great revolution, the protocol has been changed to implement data template, so the old TencentCloud_SDK developed by us will not work fine now(mqtt still works, but data template will not works fine for recently created product/devices). 2. I merge the official qlcoud sdk(include both the iot-hub and iot-explorer sdk) into the componet/conectivity to support new protocol of data template 3. iot-hub sdk, supply the fundamental iot protocol(like mqtt coap, etc.) iot-explorer sdk, supply the high level service like data template based on mqtt 4. To know how it works, see qcloud_iot_explorer_sdk_data_template、qcloud_iot_hub_sdk_mqtt example(keil project in board\TencentOS_tiny_EVB_MX_Plus\KEIL\qcloud_iot_explorer_sdk_data_template and board\TencentOS_tiny_EVB_MX_Plus\KEIL\qcloud_iot_hub_sdk_mqtt)
51 lines
1.4 KiB
CMake
51 lines
1.4 KiB
CMake
|
|
set(INC_DIR ${PROJECT_SOURCE_DIR}/output/${BUILD_TYPE}/include)
|
|
set(LINK_DIR ${PROJECT_SOURCE_DIR}/output/${BUILD_TYPE}/lib/)
|
|
include_directories(${INC_DIR})
|
|
link_directories(${LINK_DIR})
|
|
|
|
if(FEATURE_AUTH_WITH_NOTLS)
|
|
set(link_lib
|
|
iot_sdk
|
|
iot_platform
|
|
)
|
|
else()
|
|
set(link_lib
|
|
iot_sdk
|
|
iot_platform
|
|
mbedtls
|
|
mbedx509
|
|
mbedcrypto
|
|
)
|
|
endif()
|
|
|
|
if (PLATFORM STREQUAL "linux" AND COMPILE_TOOLS STREQUAL "gcc")
|
|
set(lib -Wl,--start-group ${link_lib} -Wl,--end-group)
|
|
elseif (PLATFORM STREQUAL "windows" AND COMPILE_TOOLS STREQUAL "MSVC")
|
|
set(lib ${link_lib})
|
|
endif()
|
|
|
|
|
|
|
|
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/output/${BUILD_TYPE}/bin)
|
|
|
|
|
|
# data_template
|
|
file(GLOB src_data_template_sample ${PROJECT_SOURCE_DIR}/samples/data_template/data_template_sample.c)
|
|
add_executable(data_template_sample ${src_data_template_sample})
|
|
target_link_libraries(data_template_sample ${lib})
|
|
|
|
file(GLOB src_light_data_template_sample ${PROJECT_SOURCE_DIR}/samples/scenarized/light_data_template_sample.c)
|
|
add_executable(light_data_template_sample ${src_light_data_template_sample})
|
|
target_link_libraries(light_data_template_sample ${lib})
|
|
|
|
|
|
# OTA MQTT
|
|
if(${FEATURE_OTA_COMM_ENABLED} STREQUAL "ON")
|
|
file(GLOB src_ota_mqtt_sample ${PROJECT_SOURCE_DIR}/samples/ota/ota_mqtt_sample.c)
|
|
add_executable(ota_mqtt_sample ${src_ota_mqtt_sample})
|
|
target_link_libraries(ota_mqtt_sample ${lib})
|
|
endif()
|
|
|
|
|