This will fix issue where emulator is used doing: COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} /path/to/prog arg1 arg2 Prior to this commit, it wasn't working because the following command was used: /bin/sh -c /path/to/prog arg1 arg2