This commit is contained in:
Yat Ho 2024-05-08 12:25:26 +08:00 committed by GitHub
commit 7abaa38067
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 16 deletions

View File

@ -534,7 +534,6 @@ unset(TR_MINIUPNPC_LIBNAME)
target_compile_definitions(miniupnpc::libminiupnpc
INTERFACE
SYSTEM_MINIUPNP
$<$<VERSION_LESS:${MINIUPNPC_VERSION},1.7>:MINIUPNPC_API_VERSION=${MINIUPNPC_API_VERSION}>) # API version macro was only added in 1.7
add_subdirectory(${TR_THIRD_PARTY_SOURCE_DIR}/wildmat)

View File

@ -2716,8 +2716,8 @@
isa = PBXNativeTarget;
buildConfigurationList = BE11834C0CE160A80002D0F3 /* Build configuration list for PBXNativeTarget "miniupnp" */;
buildPhases = (
A2305097100C0293003FDB0C /* ShellScript */,
C12F197C1E1AE55A0005E93F /* ShellScript */,
A2305097100C0293003FDB0C /* updateminiupnpcstrings */,
C12F197C1E1AE55A0005E93F /* symlinks */,
BE1183440CE160960002D0F3 /* Headers */,
BE1183450CE160960002D0F3 /* Sources */,
BE1183460CE160960002D0F3 /* Frameworks */,
@ -3049,7 +3049,7 @@
shellPath = /bin/sh;
shellScript = "sh update-version-h.sh\n";
};
A2305097100C0293003FDB0C /* ShellScript */ = {
A2305097100C0293003FDB0C /* updateminiupnpcstrings */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -3059,6 +3059,7 @@
"third-party/miniupnp/miniupnpc/miniupnpcstrings.h.in",
"third-party/miniupnp/miniupnpc/updateminiupnpcstrings.sh",
);
name = updateminiupnpcstrings;
outputPaths = (
"third-party/miniupnp/miniupnpc/miniupnpcstrings.h",
);
@ -3084,19 +3085,20 @@
shellPath = /bin/bash;
shellScript = "cd third-party/libevent/include/event2\n\nif [ ! -e event-config.h -a ! ../../../macosx-libevent-event-config.h -ef event-config.h ]; then\n ln -s ../../../macosx-libevent-event-config.h event-config.h;\nfi\n\nif [ ! -e ../evconfig-private.h -a ! ../../macosx-libevent-evconfig-private.h -ef ../evconfig-private.h ]; then\n ln -s ../../macosx-libevent-evconfig-private.h ../evconfig-private.h;\nfi\n";
};
C12F197C1E1AE55A0005E93F /* ShellScript */ = {
C12F197C1E1AE55A0005E93F /* symlinks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = symlinks;
outputPaths = (
"third-party/miniupnpc/miniupnp",
"third-party/miniupnp/miniupnpc/miniupnpc/miniupnpc",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd third-party/miniupnp && rm -f miniupnp && ln -s . miniupnp\n";
shellScript = "cd third-party/miniupnp/miniupnpc\nrm -rf miniupnpc\nmkdir miniupnpc\nln -s ../include miniupnpc/miniupnpc\n";
};
C12F197E1E1AE6D50005E93F /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@ -4005,7 +4007,7 @@
"third-party/libnatpmp/*.h",
"third-party/libpsl/include",
"third-party/libutp/include",
"third-party/miniupnpc/*.h",
"third-party/miniupnp/miniupnpc/miniupnpc",
"third-party/utfcpp/source",
"third-party/wide-integer",
"third-party/wildmat",
@ -4260,7 +4262,7 @@
"third-party/libnatpmp/*.h",
"third-party/libpsl/include",
"third-party/libutp/include",
"third-party/miniupnpc/*.h",
"third-party/miniupnp/miniupnpc/miniupnpc",
"third-party/utfcpp/source",
"third-party/wide-integer",
"third-party/wildmat",
@ -4593,7 +4595,7 @@
"third-party/libnatpmp/*.h",
"third-party/libpsl/include",
"third-party/libutp/include",
"third-party/miniupnpc/*.h",
"third-party/miniupnp/miniupnpc/miniupnpc",
"third-party/utfcpp/source",
"third-party/wide-integer",
"third-party/wildmat",

View File

@ -222,7 +222,6 @@ target_compile_definitions(${TR_NAME}
$<$<BOOL:${WITH_INOTIFY}>:WITH_INOTIFY>
$<$<BOOL:${WITH_KQUEUE}>:WITH_KQUEUE>
$<$<BOOL:${ENABLE_UTP}>:WITH_UTP>
$<$<VERSION_LESS:${MINIUPNPC_VERSION},1.7>:MINIUPNPC_API_VERSION=${MINIUPNPC_API_VERSION}> # API version macro was only added in 1.7
$<$<BOOL:${USE_SYSTEM_B64}>:USE_SYSTEM_B64>
$<$<BOOL:${HAVE_SO_REUSEPORT}>:HAVE_SO_REUSEPORT=1>
PUBLIC

View File

@ -15,13 +15,8 @@
#include <fmt/core.h>
#ifdef SYSTEM_MINIUPNP
#include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h>
#else
#include <miniupnp/miniupnpc.h>
#include <miniupnp/upnpcommands.h>
#endif
#define LIBTRANSMISSION_PORT_FORWARDING_MODULE