diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/argtable2/0003-add-dependence-getopt.patch | |
Diffstat (limited to 'vcpkg/ports/argtable2/0003-add-dependence-getopt.patch')
| -rw-r--r-- | vcpkg/ports/argtable2/0003-add-dependence-getopt.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/vcpkg/ports/argtable2/0003-add-dependence-getopt.patch b/vcpkg/ports/argtable2/0003-add-dependence-getopt.patch new file mode 100644 index 0000000..422f76e --- /dev/null +++ b/vcpkg/ports/argtable2/0003-add-dependence-getopt.patch @@ -0,0 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8a4bd5b..7dc50f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,7 @@ endif(COMMAND cmake_policy) + + OPTION( HAVE_GETOPT_H "Have the getopt library" 0 ) + IF( HAVE_GETOPT_H ) ++ find_package(unofficial-getopt-win32 REQUIRED) + ADD_DEFINITIONS( -DHAVE_GETOPT_H ) + ENDIF( HAVE_GETOPT_H ) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 03e112c..8c58082 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,7 +1,12 @@ + include(GNUInstallDirs) + + IF( WIN32 ) ++ if(HAVE_GETOPT_H) ++ ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h) ++ target_link_libraries(argtable2 PRIVATE unofficial::getopt-win32::getopt) ++ else() + ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) ++ endif() + ELSE( WIN32 ) + ADD_LIBRARY( argtable2 arg_date.c arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_rex.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) + ENDIF( WIN32 ) +diff --git a/src/argtable2.c b/src/argtable2.c +index c4d210c..1bc0a3e 100644 +--- a/src/argtable2.c ++++ b/src/argtable2.c +@@ -46,7 +46,7 @@ USA. + #endif + + #include "argtable2.h" +-#include "./getopt.h" ++//#include "./getopt.h" + + static + void arg_register_error(struct arg_end *end, void *parent, int error, const char *argval) |