CMakeLists.txt 871 B

123456789101112131415161718
  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. include($ENV{IDF_PATH}/tools/cmake/project.cmake)
  7. project(vlan_support)
  8. # Enabling Vlan by injecting vlan hooks into lwip.
  9. idf_component_get_property(lwip lwip COMPONENT_LIB)
  10. target_compile_options(${lwip} PRIVATE "-I${PROJECT_DIR}/main")
  11. target_compile_definitions(${lwip} PRIVATE "-DESP_IDF_LWIP_HOOK_FILENAME=\"vlan_hooks.h\""
  12. "-DETHARP_SUPPORT_VLAN=1"
  13. "-DLWIP_HOOK_VLAN_CHECK=lwip_vlan_check"
  14. "-DLWIP_HOOK_VLAN_SET=lwip_vlan_set")