Support unofficial::getopt-win32::getopt as a getopt library target

Handles the vcpkg case
This commit is contained in:
Andrew Tribick
2025-10-26 04:10:20 +01:00
committed by Jonas Kvinge
parent b4c5b9e1e1
commit 5f0175094b

View File

@@ -266,6 +266,8 @@ if(WIN32)
set(GETOPT_LIBRARIES getopt-win::getopt)
elseif(TARGET getopt::getopt_shared)
set(GETOPT_LIBRARIES getopt::getopt_shared)
elseif(TARGET unofficial::getopt-win32::getopt)
set(GETOPT_LIBRARIES unofficial::getopt-win32::getopt)
else()
message(FATAL_ERROR "Missing getopt")
endif()