if(WIN32 AND NOT MINGW) find_package(getopt CONFIG REQUIRED) if(TARGET getopt::getopt_shared) set(GETOPT_LIBRARY "getopt::getopt_shared" CACHE INTERNAL "vcpkg") else() set(GETOPT_LIBRARY "getopt::getopt_static" CACHE INTERNAL "vcpkg") endif() set(GETOPT_RUNTIME_LIBRARY "unused" CACHE INTERNAL "vcpkg") endif()