Commit e16f52c0 authored by Nico Lastzka's avatar Nico Lastzka Committed by Andrzej Puzdrowski
Browse files

cmake: fix evaluation with empty signature key file



When CONFIG_BOOT_SIGNATURE_KEY_FILE is left empty, the cmake find command gets
called with a wrong number of arguments. This patch skips the search for the
signature key file within config files in that case.

Signed-off-by: default avatarNico Lastzka <Nico.Lastzka@ATSonline.de>
parent cdee0b78
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -250,6 +250,7 @@ if(CONFIG_MCUBOOT_SERIAL)
    )
endif()

if(NOT CONFIG_BOOT_SIGNATURE_KEY_FILE STREQUAL "")
  # CONF_FILE points to the KConfig configuration files of the bootloader.
  foreach (filepath ${CONF_FILE})
    file(READ ${filepath} temp_text)
@@ -263,7 +264,6 @@ foreach (filepath ${CONF_FILE})
    endif()
  endforeach()

if(NOT CONFIG_BOOT_SIGNATURE_KEY_FILE STREQUAL "")
  if(IS_ABSOLUTE ${CONFIG_BOOT_SIGNATURE_KEY_FILE})
    set(KEY_FILE ${CONFIG_BOOT_SIGNATURE_KEY_FILE})
  elseif((DEFINED CONF_DIR) AND