function(find_xnnpack )
    set(XNNPACK_FOUND FALSE)
    find_path(XNNPACK_INCLUDE_DIR xnnpack.h)
    find_path(PTHREADPOOL_INCLUDE_DIR pthreadpool.h)
    find_path(CPUINFO_INCLUDE_DIR cpuinfo.h)
    find_library(XNNPACK_LIB XNNPACK)
    find_library(PTHREADPOOL_LIB pthreadpool)
    find_library(CPUINFO_LIB cpuinfo)

    if(XNNPACK_INCLUDE_DIR AND XNNPACK_LIB)
        set(XNNPACK_FOUND TRUE)
    endif()

    if(XNNPACK_FOUND)
        set(XNNPACK_INCLUDE_DIRS ${XNNPACK_INCLUDE_DIR} ${PTHREADPOOL_INCLUDE_DIR} ${CPUINFO_INCLUDE_DIR} PARENT_SCOPE)
        set(XNNPACK_LIBS ${XNNPACK_LIB} ${PTHREADPOOL_LIB} ${CPUINFO_LIB} PARENT_SCOPE)
        set(XNNPACK_FOUND TRUE PARENT_SCOPE)
    endif()
endfunction()
