cmake: fix regression with linux make builds
cmake: fix regression with linux make builds

Closes https://github.com/espressif/esp-idf/issues/2839

espressif/esp-idf,espressif/esp-idf,espressif/esp-idf,espressif/esp-idf