1# Each protocol handler is listed below. If you want 2# to disable some / all of these, comment out the block(s) in question 3 4set(SOURCES 5 # {{BEGIN_TARGET_SOURCES}} 6 ${CMAKE_CURRENT_LIST_DIR}/auto_ip/nx_auto_ip.c 7 ${CMAKE_CURRENT_LIST_DIR}/cloud/nx_cloud.c 8 ${CMAKE_CURRENT_LIST_DIR}/dhcp/nxd_dhcp_client.c 9 ${CMAKE_CURRENT_LIST_DIR}/dhcp/nxd_dhcp_server.c 10 ${CMAKE_CURRENT_LIST_DIR}/dhcp/nxd_dhcpv6_client.c 11 ${CMAKE_CURRENT_LIST_DIR}/dhcp/nxd_dhcpv6_server.c 12 ${CMAKE_CURRENT_LIST_DIR}/dns/nxd_dns.c 13 ${CMAKE_CURRENT_LIST_DIR}/ftp/nxd_ftp_client.c 14 ${CMAKE_CURRENT_LIST_DIR}/ftp/nxd_ftp_server.c 15 ${CMAKE_CURRENT_LIST_DIR}/http/nxd_http_client.c 16 ${CMAKE_CURRENT_LIST_DIR}/http/nxd_http_server.c 17 ${CMAKE_CURRENT_LIST_DIR}/lwm2m/nx_lwm2m_client.c 18 ${CMAKE_CURRENT_LIST_DIR}/mdns/nxd_mdns.c 19 ${CMAKE_CURRENT_LIST_DIR}/mqtt/nxd_mqtt_client.c 20 ${CMAKE_CURRENT_LIST_DIR}/nat/nx_nat.c 21 ${CMAKE_CURRENT_LIST_DIR}/pop3/nxd_pop3_client.c 22 ${CMAKE_CURRENT_LIST_DIR}/ppp/nx_ppp.c 23 ${CMAKE_CURRENT_LIST_DIR}/pppoe/nx_pppoe_client.c 24 ${CMAKE_CURRENT_LIST_DIR}/pppoe/nx_pppoe_server.c 25 ${CMAKE_CURRENT_LIST_DIR}/ptp/nxd_ptp_client.c 26 ${CMAKE_CURRENT_LIST_DIR}/smtp/nxd_smtp_client.c 27 ${CMAKE_CURRENT_LIST_DIR}/snmp/nx_des.c 28 ${CMAKE_CURRENT_LIST_DIR}/snmp/nx_sha1.c 29 ${CMAKE_CURRENT_LIST_DIR}/snmp/nxd_snmp.c 30 ${CMAKE_CURRENT_LIST_DIR}/sntp/nxd_sntp_client.c 31 ${CMAKE_CURRENT_LIST_DIR}/telnet/nxd_telnet_client.c 32 ${CMAKE_CURRENT_LIST_DIR}/telnet/nxd_telnet_server.c 33 ${CMAKE_CURRENT_LIST_DIR}/tftp/nxd_tftp_client.c 34 ${CMAKE_CURRENT_LIST_DIR}/tftp/nxd_tftp_server.c 35 ${CMAKE_CURRENT_LIST_DIR}/web/nx_tcpserver.c 36 ${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_client.c 37 ${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_server.c 38 ${CMAKE_CURRENT_LIST_DIR}/websocket/nx_websocket_client.c 39 40 # {{END_TARGET_SOURCES}} 41) 42 43# Append BSD file if the user wants it 44if(NXD_ENABLE_BSD) 45 list(APPEND SOURCES 46 ${CMAKE_CURRENT_LIST_DIR}/BSD/nxd_bsd.c 47 ) 48endif() 49 50# Append Azure IoT file if the user wants it 51if(NXD_ENABLE_AZURE_IOT) 52 list(APPEND SOURCES 53 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot.c 54 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_hub_client.c 55 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_hub_client_properties.c 56 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_json_reader.c 57 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_json_writer.c 58 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_provisioning_client.c 59 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_adu_agent.c 60 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_adu_root_key.c 61 ) 62 set(ENV{AZ_SDK_C_NO_SAMPLES} TRUE) 63 set(NX_AZURE_DISABLE_IOT_SECURITY_MODULE OFF CACHE BOOL "Disable Azure IoT Security Module (default is OFF)") 64 add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/azure_iot/azure-sdk-for-c) 65 if(NX_AZURE_DISABLE_IOT_SECURITY_MODULE) 66 target_compile_definitions(${PROJECT_NAME} PUBLIC -DNX_AZURE_DISABLE_IOT_SECURITY_MODULE) 67 else() 68 add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/azure_iot/azure_iot_security_module) 69 endif() 70endif() 71 72# Remove the file server files if the user doesn't want them 73if(NOT NXD_ENABLE_FILE_SERVERS) 74 list(REMOVE_ITEM SOURCES 75 "${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_server.c" 76 "${CMAKE_CURRENT_LIST_DIR}/http/nxd_http_server.c" 77 "${CMAKE_CURRENT_LIST_DIR}/ftp/nxd_ftp_server.c" 78 "${CMAKE_CURRENT_LIST_DIR}/tftp/nxd_tftp_server.c" 79 ) 80endif() 81 82target_sources(${PROJECT_NAME} PRIVATE ${SOURCES}) 83 84target_include_directories(${PROJECT_NAME} PUBLIC 85 ${CMAKE_CURRENT_LIST_DIR}/auto_ip 86 ${CMAKE_CURRENT_LIST_DIR}/azure_iot 87 ${CMAKE_CURRENT_LIST_DIR}/BSD 88 ${CMAKE_CURRENT_LIST_DIR}/cloud 89 ${CMAKE_CURRENT_LIST_DIR}/dhcp 90 ${CMAKE_CURRENT_LIST_DIR}/dns 91 ${CMAKE_CURRENT_LIST_DIR}/ftp 92 ${CMAKE_CURRENT_LIST_DIR}/http 93 ${CMAKE_CURRENT_LIST_DIR}/lwm2m 94 ${CMAKE_CURRENT_LIST_DIR}/mdns 95 ${CMAKE_CURRENT_LIST_DIR}/mqtt 96 ${CMAKE_CURRENT_LIST_DIR}/nat 97 ${CMAKE_CURRENT_LIST_DIR}/pop3 98 ${CMAKE_CURRENT_LIST_DIR}/ppp 99 ${CMAKE_CURRENT_LIST_DIR}/pppoe 100 ${CMAKE_CURRENT_LIST_DIR}/ptp 101 ${CMAKE_CURRENT_LIST_DIR}/smtp 102 ${CMAKE_CURRENT_LIST_DIR}/snmp 103 ${CMAKE_CURRENT_LIST_DIR}/sntp 104 ${CMAKE_CURRENT_LIST_DIR}/telnet 105 ${CMAKE_CURRENT_LIST_DIR}/tftp 106 ${CMAKE_CURRENT_LIST_DIR}/web 107 ${CMAKE_CURRENT_LIST_DIR}/websocket 108) 109