From 3f234fb2eb33fb70bd30d350b4a48171671ad36f Mon Sep 17 00:00:00 2001 From: Dubslow Date: Tue, 2 Dec 2014 15:03:29 -0600 Subject: [PATCH] disabling platform extensions now affects linking, and can be set from cmd line `qmake DISABLE_PLATFORM_EXT=YES` --- qtox.pro | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/qtox.pro b/qtox.pro index ec204255f..cbd4f3dc1 100644 --- a/qtox.pro +++ b/qtox.pro @@ -52,7 +52,12 @@ DEFINES += GIT_VERSION=\"\\\"$$quote($$GIT_VERSION)\\\"\" TIMESTAMP = $$system($1 2>null||echo 0||a;rm null;date +%s||echo 0) # I'm so sorry DEFINES += TIMESTAMP=$$TIMESTAMP DEFINES += LOG_TO_FILE -DEFINES += QTOX_PLATFORM_EXT # Comment out to increase portability + +contains(DISABLE_PLATFORM_EXT, YES) { + +} else { + DEFINES += QTOX_PLATFORM_EXT +} contains(JENKINS,YES) { INCLUDEPATH += ./libs/include/ @@ -71,7 +76,8 @@ win32 { BUNDLEID = im.tox.qtox ICON = img/icons/qtox.icns QMAKE_INFO_PLIST = osx/info.plist - LIBS += -L$$PWD/libs/lib/ -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lsodium -lvpx -framework OpenAL -framework IOKit -lopencv_core -lopencv_highgui -framework CoreFoundation + LIBS += -L$$PWD/libs/lib/ -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lsodium -lvpx -framework OpenAL -lopencv_core -lopencv_highgui + contains(DEFINES, QTOX_PLATFORM_EXT) { LIBS += -framework IOKit -framework CoreFoundation } } else { # If we're building a package, static link libtox[core,av] and libsodium, since they are not provided by any package contains(STATICPKG, YES) { @@ -79,10 +85,13 @@ win32 { INSTALLS += target LIBS += -L$$PWD/libs/lib/ -lopus -lvpx -lopenal -Wl,-Bstatic -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lsodium -lopencv_highgui -lopencv_imgproc -lopencv_core -lz -Wl,-Bdynamic LIBS += -Wl,-Bstatic -ljpeg -ltiff -lpng -ljasper -lIlmImf -lIlmThread -lIex -ldc1394 -lraw1394 -lHalf -lz -llzma -ljbig - LIBS += -Wl,-Bdynamic -lv4l1 -lv4l2 -lavformat -lavcodec -lavutil -lswscale -lusb-1.0 -lX11 -lXss - + LIBS += -Wl,-Bdynamic -lv4l1 -lv4l2 -lavformat -lavcodec -lavutil -lswscale -lusb-1.0 } else { - LIBS += -L$$PWD/libs/lib/ -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lvpx -lsodium -lopenal -lopencv_core -lopencv_highgui -lopencv_imgproc -lX11 -lXss + LIBS += -L$$PWD/libs/lib/ -ltoxcore -ltoxav -ltoxencryptsave -ltoxdns -lvpx -lsodium -lopenal -lopencv_core -lopencv_highgui -lopencv_imgproc + } + + contains(DEFINES, QTOX_PLATFORM_EXT) { + LIBS += -lX11 -lXss } contains(JENKINS, YES) {