From e6fc2be803e28a2fcd29d79bb11906cb43c1b124 Mon Sep 17 00:00:00 2001 From: Daniel DeGrasse Date: Tue, 22 Oct 2024 16:44:56 -0500 Subject: [PATCH] net: l2: wifi: add explicit dependency on "app" target for pem headers Generated PEM headers need to be created before we build the WiFi shell when WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE is enabled, so add an explicit dependency on the app target to be certain these headers are created Signed-off-by: Daniel DeGrasse --- subsys/net/l2/wifi/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subsys/net/l2/wifi/CMakeLists.txt b/subsys/net/l2/wifi/CMakeLists.txt index eb22a54cf77..38f75109454 100644 --- a/subsys/net/l2/wifi/CMakeLists.txt +++ b/subsys/net/l2/wifi/CMakeLists.txt @@ -32,6 +32,7 @@ file(MAKE_DIRECTORY ${gen_dir}) # convert .pem files to array data at build time zephyr_include_directories(${gen_inc_dir}) +if (CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE) generate_inc_file_for_target( app ${ZEPHYR_BASE}/samples/net/wifi/test_certs/client.pem @@ -67,3 +68,9 @@ generate_inc_file_for_target( ${ZEPHYR_BASE}/samples/net/wifi/test_certs/ca2.pem ${gen_dir}/ca2.pem.inc ) + +# Add explicit dependency on app target for ZEPHYR_CURRENT_LIBRARY, so these +# headers are generated at the correct point in the build +add_dependencies(${ZEPHYR_CURRENT_LIBRARY} app) + +endif() # CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE