From d21ffcff06c1572dd041337815b6b9e865cdd699 Mon Sep 17 00:00:00 2001 From: Andrew Beltrano Date: Tue, 28 Nov 2023 19:44:50 -0700 Subject: [PATCH 1/2] Add workaround for first-time hostap external project build. --- external/hostap/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/external/hostap/CMakeLists.txt b/external/hostap/CMakeLists.txt index 4c278803..d80657ed 100644 --- a/external/hostap/CMakeLists.txt +++ b/external/hostap/CMakeLists.txt @@ -43,6 +43,14 @@ ExternalProject_Add(hostap GIT_REPOSITORY "http://w1.fi/hostap.git" GIT_TAG "hostap_2_10" GIT_SHALLOW TRUE + BUILD_BYPRODUCTS + ${HOSTAP_INSTALL_BIN_DIR}/hostapd + ${HOSTAP_INSTALL_BIN_DIR}/hostapd_cli + ${HOSTAP_INSTALL_INCLUDE_DIR}/wpa_ctrl.h + ${HOSTAP_INSTALL_LIB_DIR}/libwpa_client.so + ${HOSTAP_INSTALL_SBIN_DIR}/wpa_cli + ${HOSTAP_INSTALL_SBIN_DIR}/wpa_passphrase + ${HOSTAP_INSTALL_SBIN_DIR}/wpa_supplicant CONFIGURE_COMMAND # Copy local build configuration files for libwpa_client.so and hostapd builds. COMMAND cp -n ${CMAKE_CURRENT_SOURCE_DIR}/libwpa_client/.config ${WPA_SUPPLICANT_PREFIX}/.config From 695da7e81d5fb462189e23c09a9b5330e87e9e93 Mon Sep 17 00:00:00 2001 From: Andrew Beltrano Date: Tue, 28 Nov 2023 19:52:04 -0700 Subject: [PATCH 2/2] Use INSTALL_BYPRODUCTS instead of BUILD_BYPRODUCTS. --- external/hostap/CMakeLists.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/external/hostap/CMakeLists.txt b/external/hostap/CMakeLists.txt index d80657ed..ce637870 100644 --- a/external/hostap/CMakeLists.txt +++ b/external/hostap/CMakeLists.txt @@ -43,14 +43,6 @@ ExternalProject_Add(hostap GIT_REPOSITORY "http://w1.fi/hostap.git" GIT_TAG "hostap_2_10" GIT_SHALLOW TRUE - BUILD_BYPRODUCTS - ${HOSTAP_INSTALL_BIN_DIR}/hostapd - ${HOSTAP_INSTALL_BIN_DIR}/hostapd_cli - ${HOSTAP_INSTALL_INCLUDE_DIR}/wpa_ctrl.h - ${HOSTAP_INSTALL_LIB_DIR}/libwpa_client.so - ${HOSTAP_INSTALL_SBIN_DIR}/wpa_cli - ${HOSTAP_INSTALL_SBIN_DIR}/wpa_passphrase - ${HOSTAP_INSTALL_SBIN_DIR}/wpa_supplicant CONFIGURE_COMMAND # Copy local build configuration files for libwpa_client.so and hostapd builds. COMMAND cp -n ${CMAKE_CURRENT_SOURCE_DIR}/libwpa_client/.config ${WPA_SUPPLICANT_PREFIX}/.config @@ -62,6 +54,14 @@ ExternalProject_Add(hostap INSTALL_COMMAND COMMAND Q=1 DESTDIR=${HOSTAP_INSTALL_DIR} ${MAKE} -C ${WPA_SUPPLICANT_DIR_NAME} install COMMAND Q=1 DESTDIR=${HOSTAP_INSTALL_DIR} ${MAKE} -C ${HOSTAPD_DIR_NAME} install + INSTALL_BYPRODUCTS + ${HOSTAP_INSTALL_BIN_DIR}/hostapd + ${HOSTAP_INSTALL_BIN_DIR}/hostapd_cli + ${HOSTAP_INSTALL_INCLUDE_DIR}/wpa_ctrl.h + ${HOSTAP_INSTALL_LIB_DIR}/libwpa_client.so + ${HOSTAP_INSTALL_SBIN_DIR}/wpa_cli + ${HOSTAP_INSTALL_SBIN_DIR}/wpa_passphrase + ${HOSTAP_INSTALL_SBIN_DIR}/wpa_supplicant ) # Define an interface library for libwpa_client.so that other cmake targets can use in target_link_libraries to pull it in as a dependency.