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