NNPACK not found

I am trying to build pytorch from source with NNPACK, I downloaded the NNPACK, built it and set the environment variables NNPACK_ROOT_DIR, NNPACK_INCLUDE_DIR, NNPACK_LIBRARY. The pytorch compiler script still prints:

– Could NOT find NNPACK (missing: NNPACK_INCLUDE_DIR NNPACK_LIBRARY PTHREADPOOL_LIBRARY)
– NNPACK not found. Compiling without nNPACK support

What am I doing wrong?