miniupnpc: allow _WIN32_WINNT override

This commit is contained in:
scribam 2023-06-03 09:59:00 +02:00
parent 58837ef586
commit daa90d3c5e

View File

@ -40,7 +40,10 @@ if (NOT WIN32)
target_compile_definitions(miniupnpc-private INTERFACE _NETBSD_SOURCE)
endif ()
else ()
target_compile_definitions(miniupnpc-private INTERFACE _WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends
set (MINIUPNPC_TARGET_WINDOWS_VERSION "0x0501" CACHE STRING "Minimum target Windows version as hex string") # XP or higher for getnameinfo and friends
if (MINIUPNPC_TARGET_WINDOWS_VERSION)
target_compile_definitions(miniupnpc-private INTERFACE _WIN32_WINNT=${MINIUPNPC_TARGET_WINDOWS_VERSION})
endif ()
endif ()
if (APPLE)