cmake: Windows: Use wlanapi, remove windeploy flags

The wlanapi_delayed library invocation adds complexity to the build, with a tenous advantage in terms of load time.

With the upgrade of Qt to Qt6, WindeployQt now has different arguments - so drop the ones that don't exist or do the right thing.
This commit is contained in:
Tom Dewey 2024-08-09 16:07:19 +01:00 committed by Tom Dewey
parent 480b787552
commit 15b162b824

View file

@ -192,15 +192,8 @@ elseif (WIN32)
windows/winwlancredentials.h windows/winwlancredentials.h
windows/winwlancredentials.cpp windows/winwlancredentials.cpp
) )
set(DEPENDENCIES windows/rpi-imager.rc wlanapi_delayed.lib) set(DEPENDENCIES windows/rpi-imager.rc)
set(EXTRALIBS setupapi ${CMAKE_CURRENT_BINARY_DIR}/wlanapi_delayed.lib Bcrypt.dll) set(EXTRALIBS setupapi wlanapi Bcrypt.dll)
add_custom_command(
OUTPUT wlanapi_delayed.lib
COMMAND ${CMAKE_DLLTOOL} --input-def "${CMAKE_CURRENT_SOURCE_DIR}/windows/wlanapi.def"
--output-delaylib "wlanapi_delayed.lib" --dllname "wlanapi.dll"
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/windows/wlanapi.def
VERBATIM
)
endif() endif()
include_directories(BEFORE .) include_directories(BEFORE .)
@ -362,7 +355,7 @@ if (WIN32)
add_custom_command(TARGET ${PROJECT_NAME} add_custom_command(TARGET ${PROJECT_NAME}
POST_BUILD POST_BUILD
COMMAND "${WINDEPLOYQT}" --no-translations --no-webkit2 --no-opengl-sw --angle --qmldir "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/deploy/rpi-imager.exe") COMMAND "${WINDEPLOYQT}" --no-translations --qmldir "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/deploy/rpi-imager.exe")
# Remove excess files # Remove excess files
add_custom_command(TARGET ${PROJECT_NAME} add_custom_command(TARGET ${PROJECT_NAME}