esp-idf/examples/network/vlan_support/CMakeLists.txt
Ivan Grokhotkov 6d87100a70
feat(examples): add local components via idf_component.yml
Specifying all the dependencies (managed and local) in the manifest
makes it easier for users to see every component the example
depends on.
2023-09-19 10:38:24 +02:00

19 lines
871 B
CMake

# For more information about build system see
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(vlan_support)
# Enabling Vlan by injecting vlan hooks into lwip.
idf_component_get_property(lwip lwip COMPONENT_LIB)
target_compile_options(${lwip} PRIVATE "-I${PROJECT_DIR}/main")
target_compile_definitions(${lwip} PRIVATE "-DESP_IDF_LWIP_HOOK_FILENAME=\"vlan_hooks.h\""
"-DETHARP_SUPPORT_VLAN=1"
"-DLWIP_HOOK_VLAN_CHECK=lwip_vlan_check"
"-DLWIP_HOOK_VLAN_SET=lwip_vlan_set")