From 5f0175094b6a216dc54ef593ad293ad036f8d87e Mon Sep 17 00:00:00 2001 From: Andrew Tribick Date: Sun, 26 Oct 2025 04:10:20 +0100 Subject: [PATCH] Support unofficial::getopt-win32::getopt as a getopt library target Handles the vcpkg case --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d78a9e7a4..3d0c99c8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()