1# SPDX-License-Identifier: Apache-2.0
2# Copyright (c) 2019 Intel Corp.
3
4if(CONFIG_BOARD_QEMU_X86_64 AND CONFIG_BUILD_OUTPUT_EFI)
5set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
6  COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/arch/x86/zefi/zefi.py
7  -c ${CMAKE_C_COMPILER}
8  -i ${ZEPHYR_BASE}/include ${PROJECT_BINARY_DIR}/include/generated
9  -o ${CMAKE_OBJCOPY}
10  -f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
11  $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
12  WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
13)
14endif()
15