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{ win32{
DEFINES *= WINDOWS_SYS DEFINES *= WINDOWS_SYS
INCLUDEPATH += $$PWD/../../../libs/include INCLUDEPATH += . $$INC_DIR
} }
libmicrohttpd{ libmicrohttpd{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,6 +10,24 @@ unix {
isEmpty(PLUGIN_DIR) { PLUGIN_DIR = "$${LIB_DIR}/retroshare/extensions6" } 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 { unfinished {
CONFIG += gxscircles CONFIG += gxscircles
CONFIG += gxsthewire CONFIG += gxsthewire