Commit b92d4dd7 authored by Jamie McCrae's avatar Jamie McCrae Committed by Jamie
Browse files

boot: zephyr: Only supply MBEDTLS config file path if set



Fixes an issue where the variable might not be set and be empty,
and would still be included which would cause a compiler include
empty file error

Signed-off-by: default avatarJamie McCrae <jamie.mccrae@nordicsemi.no>
parent 9fa0c6b5
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
@@ -216,12 +216,14 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
    zephyr_link_libraries(nrfxlib_crypto)
  endif()

  if(CONFIG_MBEDTLS_CFG_FILE)
    # Since here we are not using Zephyr's mbedTLS but rather our own, we need
    # to set MBEDTLS_CONFIG_FILE ourselves. When using Zephyr's copy, this
    # variable is set by its Kconfig in the Zephyr codebase.
    zephyr_library_compile_definitions(
      MBEDTLS_CONFIG_FILE="${CONFIG_MBEDTLS_CFG_FILE}"
    )
  endif()
elseif(CONFIG_BOOT_SIGNATURE_TYPE_NONE)
  zephyr_library_include_directories(
    ${BOOT_DIR}/zephyr/include