if(EXISTS ${FREERTOS_DIR}/include)
    # File structure for SDK 2.7 and newer
    target_include_directories(freertos_kernel PUBLIC
        ${FREERTOS_DIR}/include
        ${FREERTOS_DIR}/portable/${FREERTOS_PORT_DIR}/ARM_CM4F
    )
else()
    # File structure for SDK prior to 2.7
    target_include_directories(freertos_kernel PUBLIC
        ${FREERTOS_DIR}/../include
        ${FREERTOS_DIR}/../include/private
        ${FREERTOS_DIR}/portable/${FREERTOS_PORT_DIR}/ARM_CM4F
    )
endif()
