Add Win32 section in retroshare.pri

And add MSys2 directories.
This commit is contained in:
Phenom 2015-09-23 18:25:03 +02:00
parent 96597836db
commit 79d761ae2e
9 changed files with 48 additions and 35 deletions

View File

@ -24,7 +24,7 @@ unix {
win32{
DEFINES *= WINDOWS_SYS
INCLUDEPATH += $$PWD/../../../libs/include
INCLUDEPATH += . $$INC_DIR
}
libmicrohttpd{

View File

@ -253,10 +253,8 @@ win32 {
LIBS += -lsqlcipher
LIBS_DIR = $$PWD/../../../libs
DEPENDPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc
INCLUDEPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc
DEPENDPATH += . $$INC_DIR
INCLUDEPATH += . $$INC_DIR
}
################################# MacOSX ##########################################

View File

@ -17,9 +17,9 @@
#include <winsock2.h>
#define snprintf _snprintf
#endif
#include <miniwget.h>
#include <miniupnpc.h>
#include <upnpcommands.h>
#include <miniupnpc/miniwget.h>
#include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h>
/* Ensure linking names are okay on OSX platform. (C interface) */

View File

@ -35,10 +35,8 @@ win32 {
#QMAKE_CXXFLAGS_DEBUG += -O2
#QMAKE_CFLAGS_DEBUG += -O2
LIBS_DIR = $$PWD/../../../libs
DEPENDPATH += $$LIBS_DIR/include
INCLUDEPATH += $$LIBS_DIR/include
DEPENDPATH += $$INC_DIR
INCLUDEPATH += $$INC_DIR
}
# Input

View File

@ -37,7 +37,7 @@ win32 {
UI_DIR = temp/ui
DEFINES += WINDOWS_SYS WIN32 STATICLIB MINGW WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
DEFINES += MINIUPNPC_VERSION=13
#DEFINES += MINIUPNPC_VERSION=13
# DESTDIR = lib
# Switch off optimization for release version
@ -53,16 +53,16 @@ win32 {
DEFINES += USE_CMD_ARGS
#miniupnp implementation files
HEADERS += upnp/upnputil.h
SOURCES += upnp/upnputil.c
#HEADERS += upnp/upnputil.h
#SOURCES += upnp/upnputil.c
LIBS_DIR = $$PWD/../../../libs
INCLUDEPATH += . $$LIBS_DIR/include $$LIBS_DIR/include/miniupnpc
DEPENDPATH += . $$INC_DIR
INCLUDEPATH += . $$INC_DIR
PRE_TARGETDEPS += ../../retroshare-gui/src/lib/libretroshare-gui.a
LIBS += -L"../../retroshare-gui/src/lib" -lretroshare-gui
LIBS += -L"$$LIBS_DIR/lib"
for(lib, LIB_DIR):LIBS += -L"$$lib"
for(bin, BIN_DIR):LIBS += -L"$$bin"
LIBS += -lpthread
}

View File

@ -91,6 +91,12 @@ win32 {
#Have to reorder libs, else got /libs/lib/libcrypto.a(bio_lib.o):bio_lib.c:(.text+0x0): multiple definition of `BIO_new'
LIBS = -lcurl -lxml2 -lz -lxslt -lws2_32 -lwldap32 -lssl -lcrypto -lgdi32 $${LIBS}
exists(C:/msys64/mingw32/include) {
message(msys2 xml2 is installed.)
INC_DIR += "C:/msys64/mingw32/include/libxml2"
}
DEPENDPATH += . $$INC_DIR
INCLUDEPATH += . $$INC_DIR
}
openbsd-* {

View File

@ -174,14 +174,12 @@ win32 {
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
#QTPLUGIN += qjpeg
LIBS_DIR = $$PWD/../../../libs
LIBS += -L"$$LIBS_DIR/lib"
LIBS += -L"$$LIBS_DIR/bin"
for(lib, LIB_DIR):LIBS += -L"$$lib"
for(bin, BIN_DIR):LIBS += -L"$$bin"
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz -lws2_32
LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32
LIBS += -lole32 -lwinmm
LIBS += -lwinmm
RC_FILE = gui/images/retroshare_win.rc
# export symbols for the plugins
@ -192,11 +190,8 @@ win32 {
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
DEPENDPATH += .
INCLUDEPATH += .
DEPENDPATH += $$LIBS_DIR/include
INCLUDEPATH += $$LIBS_DIR/include
DEPENDPATH += . $$INC_DIR
INCLUDEPATH += . $$INC_DIR
greaterThan(QT_MAJOR_VERSION, 4) {
# Qt 5

View File

@ -72,22 +72,20 @@ win32 {
# solve linker warnings because of the order of the libraries
QMAKE_LFLAGS += -Wl,--start-group
LIBS_DIR = $$PWD/../../../libs
LIBS += -L"$$LIBS_DIR/lib"
for(lib, LIB_DIR):LIBS += -L"$$lib"
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz
LIBS += -lcrypto -lws2_32 -lgdi32
LIBS += -luuid -lole32 -liphlpapi -lcrypt32
LIBS += -lole32 -lwinmm
PROTOCPATH=$$LIBS_DIR/bin/
PROTOCPATH=$$BIN_DIR
RC_FILE = resources/retroshare_win.rc
DEFINES *= WINDOWS_SYS _USE_32BIT_TIME_T
DEPENDPATH += $$LIBS_DIR/include
INCLUDEPATH += $$LIBS_DIR/include
DEPENDPATH += . $$INC_DIR
INCLUDEPATH += . $$INC_DIR
}
##################################### MacOS ######################################

View File

@ -10,6 +10,24 @@ unix {
isEmpty(PLUGIN_DIR) { PLUGIN_DIR = "$${LIB_DIR}/retroshare/extensions6" }
}
win32 {
message(***retroshare.pri:Win32)
exists($$PWD/../libs) {
message(Get pre-compiled libraries.)
isEmpty(PREFIX) { PREFIX = "$$PWD/../libs" }
isEmpty(BIN_DIR) { BIN_DIR = "$${PREFIX}/bin" }
isEmpty(INC_DIR) { INC_DIR = "$${PREFIX}/include" }
isEmpty(LIB_DIR) { LIB_DIR = "$${PREFIX}/lib" }
}
exists(C:/msys64/mingw32/include) {
message(msys2 is installed.)
PREFIX_MSYS2 = "C:/msys64/mingw32"
BIN_DIR += "$${PREFIX_MSYS2}/bin"
INC_DIR += "$${PREFIX_MSYS2}/include"
LIB_DIR += "$${PREFIX_MSYS2}/lib"
}
}
unfinished {
CONFIG += gxscircles
CONFIG += gxsthewire