mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
Avoid depending on libupnp on linux if it is not used
This commit is contained in:
parent
e9d817e126
commit
a96310d45e
1 changed files with 3 additions and 25 deletions
|
@ -193,12 +193,6 @@ linux-* {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#CONFIG += version_detail_bash_script
|
|
||||||
|
|
||||||
# linux/bsd can use either - libupnp is more complete and packaged.
|
|
||||||
#CONFIG += upnp_miniupnpc
|
|
||||||
CONFIG += upnp_libupnp
|
|
||||||
|
|
||||||
# Check if the systems libupnp has been Debian-patched
|
# Check if the systems libupnp has been Debian-patched
|
||||||
system(grep -E 'char[[:space:]]+PublisherUrl' /usr/include/upnp/upnp.h >/dev/null 2>&1) {
|
system(grep -E 'char[[:space:]]+PublisherUrl' /usr/include/upnp/upnp.h >/dev/null 2>&1) {
|
||||||
# Normal libupnp
|
# Normal libupnp
|
||||||
|
@ -207,7 +201,8 @@ linux-* {
|
||||||
DEFINES *= PATCHED_LIBUPNP
|
DEFINES *= PATCHED_LIBUPNP
|
||||||
}
|
}
|
||||||
|
|
||||||
PKGCONFIG *= libssl libupnp
|
PKGCONFIG *= libssl
|
||||||
|
equals(RS_UPNP_LIB, "upnp ixml threadutil"):PKGCONFIG *= libupnp
|
||||||
PKGCONFIG *= libcrypto zlib
|
PKGCONFIG *= libcrypto zlib
|
||||||
no_sqlcipher:PKGCONFIG *= sqlite3
|
no_sqlcipher:PKGCONFIG *= sqlite3
|
||||||
LIBS *= -ldl
|
LIBS *= -ldl
|
||||||
|
@ -240,8 +235,6 @@ win32-x-g++ {
|
||||||
QMAKE_AR = i586-mingw32msvc-ar
|
QMAKE_AR = i586-mingw32msvc-ar
|
||||||
DEFINES *= STATICLIB WIN32
|
DEFINES *= STATICLIB WIN32
|
||||||
|
|
||||||
CONFIG += upnp_miniupnpc
|
|
||||||
|
|
||||||
SSL_DIR=../../../../openssl
|
SSL_DIR=../../../../openssl
|
||||||
UPNPC_DIR = ../../../../miniupnpc-1.3
|
UPNPC_DIR = ../../../../miniupnpc-1.3
|
||||||
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
GPG_ERROR_DIR = ../../../../libgpg-error-1.7
|
||||||
|
@ -309,10 +302,6 @@ freebsd-* {
|
||||||
INCLUDEPATH *= /usr/local/include/glib-2.0
|
INCLUDEPATH *= /usr/local/include/glib-2.0
|
||||||
|
|
||||||
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
|
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
|
||||||
|
|
||||||
# linux/bsd can use either - libupnp is more complete and packaged.
|
|
||||||
#CONFIG += upnp_miniupnpc
|
|
||||||
CONFIG += upnp_libupnp
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################# OpenBSD ##########################################
|
################################# OpenBSD ##########################################
|
||||||
|
@ -322,8 +311,6 @@ openbsd-* {
|
||||||
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")
|
INCLUDEPATH += $$system(pkg-config --cflags glib-2.0 | sed -e "s/-I//g")
|
||||||
|
|
||||||
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
|
QMAKE_CXXFLAGS *= -Dfseeko64=fseeko -Dftello64=ftello -Dstat64=stat -Dstatvfs64=statvfs -Dfopen64=fopen
|
||||||
|
|
||||||
CONFIG += upnp_libupnp
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################# Haiku ##########################################
|
################################# Haiku ##########################################
|
||||||
|
@ -335,7 +322,6 @@ haiku-* {
|
||||||
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
|
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
|
||||||
DEFINES *= NO_SQLCIPHER
|
DEFINES *= NO_SQLCIPHER
|
||||||
CONFIG += release
|
CONFIG += release
|
||||||
CONFIG += upnp_libupnp
|
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -661,12 +647,6 @@ SOURCES += util/folderiterator.cc \
|
||||||
util/rstime.cc \
|
util/rstime.cc \
|
||||||
util/rsurl.cc
|
util/rsurl.cc
|
||||||
|
|
||||||
## Added for retrocompatibility remove ASAP
|
|
||||||
isEmpty(RS_UPNP_LIB) {
|
|
||||||
upnp_miniupnpc:RS_UPNP_LIB=miniupnpc
|
|
||||||
upnp_libupnp:RS_UPNP_LIB="upnp ixml threadutil"
|
|
||||||
}
|
|
||||||
|
|
||||||
equals(RS_UPNP_LIB, miniupnpc) {
|
equals(RS_UPNP_LIB, miniupnpc) {
|
||||||
HEADERS += upnp/upnputil.h upnp/upnphandler_miniupnp.h
|
HEADERS += upnp/upnputil.h upnp/upnphandler_miniupnp.h
|
||||||
SOURCES += upnp/upnputil.c upnp/upnphandler_miniupnp.cc
|
SOURCES += upnp/upnputil.c upnp/upnphandler_miniupnp.cc
|
||||||
|
@ -676,8 +656,6 @@ equals(RS_UPNP_LIB, miniupnpc) {
|
||||||
DEFINES *= RS_USE_LIBUPNP
|
DEFINES *= RS_USE_LIBUPNP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
zeroconf {
|
zeroconf {
|
||||||
|
|
||||||
HEADERS += zeroconf/p3zeroconf.h \
|
HEADERS += zeroconf/p3zeroconf.h \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue