Filelists.cmake 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. if(NOT ${CMAKE_VERSION} VERSION_LESS "3.10.0")
  11. include_guard(GLOBAL)
  12. endif()
  13. set(lwipcontribexamples_SRCS
  14. ${LWIP_CONTRIB_DIR}/examples/httpd/fs_example/fs_example.c
  15. ${LWIP_CONTRIB_DIR}/examples/httpd/https_example/https_example.c
  16. ${LWIP_CONTRIB_DIR}/examples/httpd/ssi_example/ssi_example.c
  17. ${LWIP_CONTRIB_DIR}/examples/lwiperf/lwiperf_example.c
  18. ${LWIP_CONTRIB_DIR}/examples/mdns/mdns_example.c
  19. ${LWIP_CONTRIB_DIR}/examples/mqtt/mqtt_example.c
  20. ${LWIP_CONTRIB_DIR}/examples/ppp/pppos_example.c
  21. ${LWIP_CONTRIB_DIR}/examples/snmp/snmp_private_mib/lwip_prvmib.c
  22. ${LWIP_CONTRIB_DIR}/examples/snmp/snmp_v3/snmpv3_dummy.c
  23. ${LWIP_CONTRIB_DIR}/examples/snmp/snmp_example.c
  24. ${LWIP_CONTRIB_DIR}/examples/sntp/sntp_example.c
  25. ${LWIP_CONTRIB_DIR}/examples/tftp/tftp_example.c
  26. )
  27. add_library(lwipcontribexamples EXCLUDE_FROM_ALL ${lwipcontribexamples_SRCS})
  28. target_compile_options(lwipcontribexamples PRIVATE ${LWIP_COMPILER_FLAGS})
  29. target_compile_definitions(lwipcontribexamples PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
  30. target_include_directories(lwipcontribexamples PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})
  31. set(lwipcontribapps_SRCS
  32. ${LWIP_CONTRIB_DIR}/apps/httpserver/httpserver-netconn.c
  33. ${LWIP_CONTRIB_DIR}/apps/chargen/chargen.c
  34. ${LWIP_CONTRIB_DIR}/apps/udpecho/udpecho.c
  35. ${LWIP_CONTRIB_DIR}/apps/tcpecho/tcpecho.c
  36. ${LWIP_CONTRIB_DIR}/apps/shell/shell.c
  37. ${LWIP_CONTRIB_DIR}/apps/udpecho_raw/udpecho_raw.c
  38. ${LWIP_CONTRIB_DIR}/apps/tcpecho_raw/tcpecho_raw.c
  39. ${LWIP_CONTRIB_DIR}/apps/netio/netio.c
  40. ${LWIP_CONTRIB_DIR}/apps/ping/ping.c
  41. ${LWIP_CONTRIB_DIR}/apps/socket_examples/socket_examples.c
  42. ${LWIP_CONTRIB_DIR}/apps/rtp/rtp.c
  43. )
  44. add_library(lwipcontribapps EXCLUDE_FROM_ALL ${lwipcontribapps_SRCS})
  45. target_compile_options(lwipcontribapps PRIVATE ${LWIP_COMPILER_FLAGS})
  46. target_compile_definitions(lwipcontribapps PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
  47. target_include_directories(lwipcontribapps PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})
  48. set(lwipcontribaddons_SRCS
  49. ${LWIP_CONTRIB_DIR}/addons/tcp_isn/tcp_isn.c
  50. ${LWIP_CONTRIB_DIR}/addons/ipv6_static_routing/ip6_route_table.c
  51. # ${LWIP_CONTRIB_DIR}/addons/netconn/external_resolve/dnssd.c
  52. # ${LWIP_CONTRIB_DIR}/addons/tcp_md5/tcp_md5.c
  53. )
  54. add_library(lwipcontribaddons EXCLUDE_FROM_ALL ${lwipcontribaddons_SRCS})
  55. target_compile_options(lwipcontribaddons PRIVATE ${LWIP_COMPILER_FLAGS})
  56. target_compile_definitions(lwipcontribaddons PRIVATE ${LWIP_DEFINITIONS} ${LWIP_MBEDTLS_DEFINITIONS})
  57. target_include_directories(lwipcontribaddons PRIVATE ${LWIP_INCLUDE_DIRS} ${LWIP_MBEDTLS_INCLUDE_DIRS})