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}/mdns/nxd_mdns.c 18 ${CMAKE_CURRENT_LIST_DIR}/mqtt/nxd_mqtt_client.c 19 ${CMAKE_CURRENT_LIST_DIR}/nat/nx_nat.c 20 ${CMAKE_CURRENT_LIST_DIR}/pop3/nxd_pop3_client.c 21 ${CMAKE_CURRENT_LIST_DIR}/ppp/nx_ppp.c 22 ${CMAKE_CURRENT_LIST_DIR}/pppoe/nx_pppoe_client.c 23 ${CMAKE_CURRENT_LIST_DIR}/pppoe/nx_pppoe_server.c 24 ${CMAKE_CURRENT_LIST_DIR}/ptp/nxd_ptp_client.c 25 ${CMAKE_CURRENT_LIST_DIR}/smtp/nxd_smtp_client.c 26 ${CMAKE_CURRENT_LIST_DIR}/snmp/nx_des.c 27 ${CMAKE_CURRENT_LIST_DIR}/snmp/nx_sha1.c 28 ${CMAKE_CURRENT_LIST_DIR}/snmp/nxd_snmp.c 29 ${CMAKE_CURRENT_LIST_DIR}/sntp/nxd_sntp_client.c 30 ${CMAKE_CURRENT_LIST_DIR}/telnet/nxd_telnet_client.c 31 ${CMAKE_CURRENT_LIST_DIR}/telnet/nxd_telnet_server.c 32 ${CMAKE_CURRENT_LIST_DIR}/tftp/nxd_tftp_client.c 33 ${CMAKE_CURRENT_LIST_DIR}/tftp/nxd_tftp_server.c 34 ${CMAKE_CURRENT_LIST_DIR}/web/nx_tcpserver.c 35 ${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_client.c 36 ${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_server.c 37 ${CMAKE_CURRENT_LIST_DIR}/websocket/nx_websocket_client.c 38 ${CMAKE_CURRENT_LIST_DIR}/rtp/nx_rtp_sender.c 39 ${CMAKE_CURRENT_LIST_DIR}/rtsp/nx_rtsp_server.c 40 41 # {{END_TARGET_SOURCES}} 42) 43 44# Append BSD file if the user wants it 45if(NXD_ENABLE_BSD) 46 list(APPEND SOURCES 47 ${CMAKE_CURRENT_LIST_DIR}/BSD/nxd_bsd.c 48 ) 49endif() 50 51# Append Azure IoT file if the user wants it 52if(NXD_ENABLE_AZURE_IOT) 53 list(APPEND SOURCES 54 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot.c 55 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_hub_client.c 56 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_hub_client_properties.c 57 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_json_reader.c 58 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_json_writer.c 59 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_provisioning_client.c 60 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_adu_agent.c 61 ${CMAKE_CURRENT_LIST_DIR}/azure_iot/nx_azure_iot_adu_root_key.c 62 ) 63 set(ENV{AZ_SDK_C_NO_SAMPLES} TRUE) 64 add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/azure_iot/azure-sdk-for-c) 65endif() 66 67# Remove the file server files if the user doesn't want them 68if(NOT NXD_ENABLE_FILE_SERVERS) 69 list(REMOVE_ITEM SOURCES 70 "${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_server.c" 71 "${CMAKE_CURRENT_LIST_DIR}/http/nxd_http_server.c" 72 "${CMAKE_CURRENT_LIST_DIR}/ftp/nxd_ftp_server.c" 73 "${CMAKE_CURRENT_LIST_DIR}/tftp/nxd_tftp_server.c" 74 ) 75endif() 76 77target_sources(${PROJECT_NAME} PRIVATE ${SOURCES}) 78 79target_include_directories(${PROJECT_NAME} PUBLIC 80 ${CMAKE_CURRENT_LIST_DIR}/auto_ip 81 ${CMAKE_CURRENT_LIST_DIR}/azure_iot 82 ${CMAKE_CURRENT_LIST_DIR}/BSD 83 ${CMAKE_CURRENT_LIST_DIR}/cloud 84 ${CMAKE_CURRENT_LIST_DIR}/dhcp 85 ${CMAKE_CURRENT_LIST_DIR}/dns 86 ${CMAKE_CURRENT_LIST_DIR}/ftp 87 ${CMAKE_CURRENT_LIST_DIR}/http 88 ${CMAKE_CURRENT_LIST_DIR}/mdns 89 ${CMAKE_CURRENT_LIST_DIR}/mqtt 90 ${CMAKE_CURRENT_LIST_DIR}/nat 91 ${CMAKE_CURRENT_LIST_DIR}/pop3 92 ${CMAKE_CURRENT_LIST_DIR}/ppp 93 ${CMAKE_CURRENT_LIST_DIR}/pppoe 94 ${CMAKE_CURRENT_LIST_DIR}/ptp 95 ${CMAKE_CURRENT_LIST_DIR}/smtp 96 ${CMAKE_CURRENT_LIST_DIR}/snmp 97 ${CMAKE_CURRENT_LIST_DIR}/sntp 98 ${CMAKE_CURRENT_LIST_DIR}/telnet 99 ${CMAKE_CURRENT_LIST_DIR}/tftp 100 ${CMAKE_CURRENT_LIST_DIR}/web 101 ${CMAKE_CURRENT_LIST_DIR}/websocket 102 ${CMAKE_CURRENT_LIST_DIR}/rtp 103 ${CMAKE_CURRENT_LIST_DIR}/rtsp 104) 105