• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file is indended to be included in end-user CMakeLists.txt
2# include(/path/to/Filelists.cmake)
3# It assumes the variable LWIP_CONTRIB_DIR is defined pointing to the
4# root path of lwIP/contrib sources.
5#
6# This file is NOT designed (on purpose) to be used as cmake
7# subdir via add_subdirectory()
8# The intention is to provide greater flexibility to users to
9# create their own targets using the *_SRCS variables.
10
11if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0")
12    include_guard(GLOBAL)
13endif()
14
15set(lwipcontribexamples_SRCS
16    ${LWIP_CONTRIB_DIR}/examples/httpd/fs_example/fs_example.c
17    ${LWIP_CONTRIB_DIR}/examples/httpd/https_example/https_example.c
18    ${LWIP_CONTRIB_DIR}/examples/httpd/ssi_example/ssi_example.c
19    ${LWIP_CONTRIB_DIR}/examples/lwiperf/lwiperf_example.c
20    ${LWIP_CONTRIB_DIR}/examples/mdns/mdns_example.c
21    ${LWIP_CONTRIB_DIR}/examples/mqtt/mqtt_example.c
22    ${LWIP_CONTRIB_DIR}/examples/ppp/pppos_example.c
23    ${LWIP_CONTRIB_DIR}/examples/snmp/snmp_private_mib/lwip_prvmib.c
24    ${LWIP_CONTRIB_DIR}/examples/snmp/snmp_v3/snmpv3_dummy.c
25    ${LWIP_CONTRIB_DIR}/examples/snmp/snmp_example.c
26    ${LWIP_CONTRIB_DIR}/examples/sntp/sntp_example.c
27    ${LWIP_CONTRIB_DIR}/examples/tftp/tftp_example.c
28)
29add_library(lwipcontribexamples EXCLUDE_FROM_ALL ${lwipcontribexamples_SRCS})
30target_compile_options(lwipcontribexamples PRIVATE ${LWIP_COMPILER_FLAGS})
31target_compile_definitions(lwipcontribexamples PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
32target_include_directories(lwipcontribexamples PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})
33
34set(lwipcontribapps_SRCS
35    ${LWIP_CONTRIB_DIR}/apps/httpserver/httpserver-netconn.c
36    ${LWIP_CONTRIB_DIR}/apps/chargen/chargen.c
37    ${LWIP_CONTRIB_DIR}/apps/udpecho/udpecho.c
38    ${LWIP_CONTRIB_DIR}/apps/tcpecho/tcpecho.c
39    ${LWIP_CONTRIB_DIR}/apps/shell/shell.c
40    ${LWIP_CONTRIB_DIR}/apps/udpecho_raw/udpecho_raw.c
41    ${LWIP_CONTRIB_DIR}/apps/tcpecho_raw/tcpecho_raw.c
42    ${LWIP_CONTRIB_DIR}/apps/netio/netio.c
43    ${LWIP_CONTRIB_DIR}/apps/ping/ping.c
44    ${LWIP_CONTRIB_DIR}/apps/socket_examples/socket_examples.c
45    ${LWIP_CONTRIB_DIR}/apps/rtp/rtp.c
46)
47add_library(lwipcontribapps EXCLUDE_FROM_ALL ${lwipcontribapps_SRCS})
48target_compile_options(lwipcontribapps PRIVATE ${LWIP_COMPILER_FLAGS})
49target_compile_definitions(lwipcontribapps PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
50target_include_directories(lwipcontribapps PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})
51
52set(lwipcontribaddons_SRCS
53    ${LWIP_CONTRIB_DIR}/addons/tcp_isn/tcp_isn.c
54    ${LWIP_CONTRIB_DIR}/addons/ipv6_static_routing/ip6_route_table.c
55#    ${LWIP_CONTRIB_DIR}/addons/netconn/external_resolve/dnssd.c
56#    ${LWIP_CONTRIB_DIR}/addons/tcp_md5/tcp_md5.c
57)
58add_library(lwipcontribaddons EXCLUDE_FROM_ALL ${lwipcontribaddons_SRCS})
59target_compile_options(lwipcontribaddons PRIVATE ${LWIP_COMPILER_FLAGS})
60target_compile_definitions(lwipcontribaddons PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
61target_include_directories(lwipcontribaddons PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})
62