1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-31 06:50:06 +03:00

build: add missing Bcrypt link on Windows

When building on Windows, we must link against `Bcrypt` to satisfy the
use of `BCryptGenRandom`. Add this to the link interface in CMake to
allow use of libxml2 as a static library.
This commit is contained in:
Saleem Abdulrasool 2024-11-22 15:48:07 -08:00
parent 9cd4748799
commit 4e27bbddfa
2 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ if(NOT LIBXML2_SHARED)
endif()
if(WIN32)
list(APPEND LIBXML2_LIBRARIES ws2_32)
list(APPEND LIBXML2_LIBRARIES ws2_32;Bcrypt)
endif()
endif()

View File

@ -113,8 +113,8 @@ if(UNIX)
endif()
if(WIN32)
list(APPEND LIBXML2_LIBRARIES ws2_32)
list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:ws2_32>")
list(APPEND LIBXML2_LIBRARIES ws2_32;Bcrypt)
list(APPEND LIBXML2_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:ws2_32>;\$<LINK_ONLY:Bcrypt>")
endif()
# whether libxml2 has dso support