CMakeLists.txt 962 B

1234567891011121314151617181920
  1. # For more information about build system see
  2. # https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
  3. # The following five lines of boilerplate have to be in your project's
  4. # CMakeLists in this exact order for cmake to work correctly
  5. cmake_minimum_required(VERSION 3.16)
  6. set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/ethernet/basic/components/ethernet_init)
  7. include($ENV{IDF_PATH}/tools/cmake/project.cmake)
  8. project(vlan_support)
  9. # Enabling Vlan by injecting vlan hooks into lwip.
  10. idf_component_get_property(lwip lwip COMPONENT_LIB)
  11. target_compile_options(${lwip} PRIVATE "-I${PROJECT_DIR}/main")
  12. target_compile_definitions(${lwip} PRIVATE "-DESP_IDF_LWIP_HOOK_FILENAME=\"vlan_hooks.h\""
  13. "-DETHARP_SUPPORT_VLAN=1"
  14. "-DLWIP_HOOK_VLAN_CHECK=lwip_vlan_check"
  15. "-DLWIP_HOOK_VLAN_SET=lwip_vlan_set")