diff --git a/cmake/MsQuic.cmake b/cmake/MsQuic.cmake index 4ef84777..3f8603d1 100644 --- a/cmake/MsQuic.cmake +++ b/cmake/MsQuic.cmake @@ -274,7 +274,16 @@ function(lg_add_static_msquic) set(LG_MSQUIC_DEBUG_LIBRARY "${LG_MSQUIC_BINARY_DIR}/bin/Debug/msquic.lib") set(LG_MSQUIC_BUILD_CONFIG "$") + set(LG_MSQUIC_BUILD_LIBRARIES + "${LG_MSQUIC_BINARY_DIR}/bin/$,Debug,Release>/msquic.lib" + "${LG_MSQUIC_BINARY_DIR}/obj/$,Debug,Release>/msquic.lib") + + # The Windows archive step overwrites its intermediate library with the + # monolithic result. Recreate both archives before combining dependencies + # so a later nested build does not add OpenSSL to the prior result again. set(LG_MSQUIC_BUILD_COMMAND + "${CMAKE_COMMAND}" -E rm -f ${LG_MSQUIC_BUILD_LIBRARIES} + COMMAND "${CMAKE_COMMAND}" --build --config ${LG_MSQUIC_BUILD_CONFIG} --target msquic_lib