file(READ ${VERSION_HEADER} V) string(REGEX MATCH "\"([^\"]*)\"" _m "${V}") set(VERSION "${CMAKE_MATCH_1}") execute_process(COMMAND python3 ${MKIMAGE} --image ${IMAGE} --device ${DEVICE} --version ${VERSION} --out ${OUT} RESULT_VARIABLE rc) if(NOT rc EQUAL 0) message(FATAL_ERROR "nl_mkimage failed (${rc})") endif()