2014-04-05 03:27:18 -04:00
|
|
|
QT += network xml script
|
|
|
|
CONFIG += bitdht
|
|
|
|
|
|
|
|
CONFIG += gxs debug
|
|
|
|
|
2014-05-04 08:50:19 -04:00
|
|
|
LIBS += -lgtest
|
2014-04-05 03:27:18 -04:00
|
|
|
|
|
|
|
gxs {
|
|
|
|
DEFINES += RS_ENABLE_GXS
|
|
|
|
}
|
|
|
|
|
|
|
|
TEMPLATE = app
|
|
|
|
TARGET = unittests
|
|
|
|
|
2014-04-27 09:26:14 -04:00
|
|
|
OPENPGPSDK_DIR = ../../openpgpsdk/src
|
|
|
|
INCLUDEPATH *= $${OPENPGPSDK_DIR} ../openpgpsdk
|
|
|
|
|
2014-04-05 03:27:18 -04:00
|
|
|
################################# Linux ##########################################
|
|
|
|
# Put lib dir in QMAKE_LFLAGS so it appears before -L/usr/lib
|
|
|
|
linux-* {
|
|
|
|
#CONFIG += version_detail_bash_script
|
|
|
|
QMAKE_CXXFLAGS *= -D_FILE_OFFSET_BITS=64
|
|
|
|
|
|
|
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
|
|
|
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
|
|
|
|
|
|
|
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
2014-04-10 04:46:15 -04:00
|
|
|
LIBS += ../librssimulator/lib/librssimulator.a
|
2014-04-05 03:27:18 -04:00
|
|
|
LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2
|
|
|
|
LIBS += -lssl -lupnp -lixml -lXss -lgnome-keyring
|
|
|
|
LIBS *= -lcrypto -ldl -lX11 -lz
|
|
|
|
|
2014-11-15 14:47:59 -05:00
|
|
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
|
|
|
|
|
|
|
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
|
|
|
|
|
|
|
SQLCIPHER_OK = $$system(pkg-config --exists sqlcipher && echo yes)
|
|
|
|
isEmpty(SQLCIPHER_OK) {
|
|
|
|
# We need a explicit path here, to force using the home version of sqlite3 that really encrypts the database.
|
|
|
|
|
|
|
|
! exists(../../../lib/sqlcipher/.libs/libsqlcipher.a) {
|
|
|
|
message(../../../lib/sqlcipher/.libs/libsqlcipher.a does not exist)
|
|
|
|
error(Please fix this and try again. Will stop now.)
|
|
|
|
}
|
2014-04-05 03:27:18 -04:00
|
|
|
|
|
|
|
LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
|
2014-11-15 14:47:59 -05:00
|
|
|
INCLUDEPATH += ../../../lib/sqlcipher/src/
|
|
|
|
INCLUDEPATH += ../../../lib/sqlcipher/tsrc/
|
|
|
|
|
|
|
|
} else {
|
|
|
|
LIBS += -lsqlcipher
|
2014-04-05 03:27:18 -04:00
|
|
|
}
|
|
|
|
|
2014-11-15 14:47:59 -05:00
|
|
|
|
2014-04-05 03:27:18 -04:00
|
|
|
LIBS *= -lglib-2.0
|
|
|
|
LIBS *= -rdynamic
|
|
|
|
DEFINES *= HAVE_XSS # for idle time, libx screensaver extensions
|
|
|
|
DEFINES *= UBUNTU
|
|
|
|
}
|
|
|
|
|
|
|
|
linux-g++ {
|
|
|
|
OBJECTS_DIR = temp/linux-g++/obj
|
|
|
|
}
|
|
|
|
|
|
|
|
linux-g++-64 {
|
|
|
|
OBJECTS_DIR = temp/linux-g++-64/obj
|
|
|
|
}
|
|
|
|
|
|
|
|
#################### Cross compilation for windows under Linux ###################
|
|
|
|
|
|
|
|
win32-x-g++ {
|
|
|
|
OBJECTS_DIR = temp/win32-x-g++/obj
|
|
|
|
|
|
|
|
LIBS += ../../libretroshare/src/lib.win32xgcc/libretroshare.a
|
|
|
|
LIBS += ../../../../lib/win32-x-g++-v0.5/libssl.a
|
|
|
|
LIBS += ../../../../lib/win32-x-g++-v0.5/libcrypto.a
|
|
|
|
LIBS += ../../../../lib/win32-x-g++-v0.5/libgpgme.dll.a
|
|
|
|
LIBS += ../../../../lib/win32-x-g++-v0.5/libminiupnpc.a
|
|
|
|
LIBS += ../../../../lib/win32-x-g++-v0.5/libz.a
|
|
|
|
LIBS += -L${HOME}/.wine/drive_c/pthreads/lib -lpthreadGCE2
|
|
|
|
LIBS += -lQtUiTools
|
|
|
|
LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32 -gdi32
|
|
|
|
LIBS += -lole32 -lwinmm
|
|
|
|
|
|
|
|
DEFINES *= WINDOWS_SYS WIN32 WIN32_CROSS_UBUNTU
|
|
|
|
|
|
|
|
INCLUDEPATH += ../../../../gpgme-1.1.8/src/
|
|
|
|
INCLUDEPATH += ../../../../libgpg-error-1.7/src/
|
|
|
|
|
|
|
|
RC_FILE = gui/images/retroshare_win.rc
|
|
|
|
}
|
|
|
|
|
|
|
|
#################################### Windows #####################################
|
|
|
|
|
|
|
|
win32 {
|
|
|
|
# Switch on extra warnings
|
|
|
|
QMAKE_CFLAGS += -Wextra
|
|
|
|
QMAKE_CXXFLAGS += -Wextra
|
|
|
|
|
|
|
|
# Switch off optimization for release version
|
|
|
|
QMAKE_CXXFLAGS_RELEASE -= -O2
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -O0
|
|
|
|
QMAKE_CFLAGS_RELEASE -= -O2
|
|
|
|
QMAKE_CFLAGS_RELEASE += -O0
|
|
|
|
|
|
|
|
# Switch on optimization for debug version
|
|
|
|
#QMAKE_CXXFLAGS_DEBUG += -O2
|
|
|
|
#QMAKE_CFLAGS_DEBUG += -O2
|
|
|
|
|
|
|
|
OBJECTS_DIR = temp/obj
|
|
|
|
#LIBS += -L"D/Qt/2009.03/qt/plugins/imageformats"
|
|
|
|
#QTPLUGIN += qjpeg
|
|
|
|
|
|
|
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
2014-04-10 04:46:15 -04:00
|
|
|
PRE_TARGETDEPS *= ../librssimulator/lib/librssimulator.a
|
2014-04-05 03:27:18 -04:00
|
|
|
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
|
|
|
|
|
|
|
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
|
|
|
LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2
|
|
|
|
LIBS += -L"$$PWD/../../../lib"
|
|
|
|
|
|
|
|
gxs {
|
|
|
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
|
|
|
LIBS += -lsqlcipher
|
|
|
|
}
|
|
|
|
|
|
|
|
LIBS += -lssl -lcrypto -lpthread -lminiupnpc -lz
|
|
|
|
# added after bitdht
|
|
|
|
# LIBS += -lws2_32
|
2014-10-08 12:44:25 -04:00
|
|
|
LIBS += -luuid -lole32 -liphlpapi -lcrypt32 -lgdi32
|
2014-04-05 03:27:18 -04:00
|
|
|
LIBS += -lole32 -lwinmm
|
|
|
|
RC_FILE = gui/images/retroshare_win.rc
|
|
|
|
|
|
|
|
# export symbols for the plugins
|
|
|
|
LIBS += -Wl,--export-all-symbols,--out-implib,lib/libretroshare-gui.a
|
|
|
|
|
|
|
|
# create lib directory
|
|
|
|
QMAKE_PRE_LINK = $(CHK_DIR_EXISTS) lib $(MKDIR) lib
|
|
|
|
|
|
|
|
DEFINES *= WINDOWS_SYS WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
|
|
|
|
|
|
|
INCLUDEPATH += .
|
|
|
|
}
|
|
|
|
|
|
|
|
##################################### MacOS ######################################
|
|
|
|
|
|
|
|
macx {
|
|
|
|
# ENABLE THIS OPTION FOR Univeral Binary BUILD.
|
|
|
|
CONFIG += ppc x86
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
|
|
|
|
|
|
|
|
CONFIG += version_detail_bash_script
|
|
|
|
LIBS += ../../libretroshare/src/lib/libretroshare.a
|
2014-04-10 04:46:15 -04:00
|
|
|
LIBS += ../librssimulator/lib/librssimulator.a
|
2014-04-05 03:27:18 -04:00
|
|
|
LIBS += ../../openpgpsdk/src/lib/libops.a -lbz2
|
|
|
|
LIBS += -lssl -lcrypto -lz
|
|
|
|
#LIBS += -lssl -lcrypto -lz -lgpgme -lgpg-error -lassuan
|
|
|
|
LIBS += ../../../miniupnpc-1.0/libminiupnpc.a
|
|
|
|
LIBS += -framework CoreFoundation
|
|
|
|
LIBS += -framework Security
|
|
|
|
|
|
|
|
gxs {
|
|
|
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
|
|
|
|
|
|
|
LIBS += ../../../lib/libsqlcipher.a
|
|
|
|
#LIBS += -lsqlite3
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += .
|
|
|
|
#DEFINES* = MAC_IDLE # for idle feature
|
|
|
|
CONFIG -= uitools
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
##################################### FreeBSD ######################################
|
|
|
|
|
|
|
|
freebsd-* {
|
|
|
|
INCLUDEPATH *= /usr/local/include/gpgme
|
|
|
|
LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
2014-04-10 04:46:15 -04:00
|
|
|
LIBS *= ../librssimulator/lib/librssimulator.a
|
2014-04-05 03:27:18 -04:00
|
|
|
LIBS *= -lssl
|
|
|
|
LIBS *= -lgpgme
|
|
|
|
LIBS *= -lupnp
|
|
|
|
LIBS *= -lgnome-keyring
|
|
|
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
|
|
|
|
|
|
|
gxs {
|
|
|
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
|
|
|
LIBS += -lsqlite3
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
##################################### OpenBSD ######################################
|
|
|
|
|
|
|
|
openbsd-* {
|
|
|
|
INCLUDEPATH *= /usr/local/include
|
|
|
|
|
|
|
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
|
|
|
PRE_TARGETDEPS *= ../../openpgpsdk/src/lib/libops.a
|
|
|
|
|
|
|
|
LIBS *= ../../libretroshare/src/lib/libretroshare.a
|
2014-04-10 04:46:15 -04:00
|
|
|
LIBS *= ../librssimulator/lib/librssimulator.a
|
2014-04-05 03:27:18 -04:00
|
|
|
LIBS *= ../../openpgpsdk/src/lib/libops.a -lbz2
|
|
|
|
LIBS *= -lssl -lcrypto
|
|
|
|
LIBS *= -lgpgme
|
|
|
|
LIBS *= -lupnp
|
|
|
|
LIBS *= -lgnome-keyring
|
|
|
|
PRE_TARGETDEPS *= ../../libretroshare/src/lib/libretroshare.a
|
|
|
|
|
|
|
|
gxs {
|
|
|
|
LIBS += ../../supportlibs/pegmarkdown/lib/libpegmarkdown.a
|
|
|
|
LIBS += -lsqlite3
|
|
|
|
}
|
|
|
|
|
|
|
|
LIBS *= -rdynamic
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
############################## Common stuff ######################################
|
|
|
|
|
|
|
|
# On Linux systems that alredy have libssl and libcrypto it is advisable
|
|
|
|
# to rename the patched version of SSL to something like libsslxpgp.a and libcryptoxpg.a
|
|
|
|
|
|
|
|
# ###########################################
|
|
|
|
|
|
|
|
bitdht {
|
|
|
|
LIBS += ../../libbitdht/src/lib/libbitdht.a
|
|
|
|
PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a
|
|
|
|
}
|
|
|
|
|
|
|
|
win32 {
|
|
|
|
# must be added after bitdht
|
|
|
|
LIBS += -lws2_32
|
|
|
|
}
|
|
|
|
|
|
|
|
DEPENDPATH += . \
|
|
|
|
|
|
|
|
INCLUDEPATH += ../../libretroshare/src/
|
2014-04-10 04:46:15 -04:00
|
|
|
INCLUDEPATH += ../librssimulator/
|
2014-04-05 03:27:18 -04:00
|
|
|
|
|
|
|
SOURCES += unittests.cc \
|
|
|
|
|
|
|
|
################################ Serialiser ################################
|
|
|
|
HEADERS += libretroshare/serialiser/support.h \
|
|
|
|
libretroshare/serialiser/rstlvutil.h \
|
|
|
|
|
|
|
|
SOURCES += libretroshare/serialiser/rsturtleitem_test.cc \
|
|
|
|
libretroshare/serialiser/rsbaseitem_test.cc \
|
|
|
|
libretroshare/serialiser/rsgxsupdateitem_test.cc \
|
|
|
|
libretroshare/serialiser/rsmsgitem_test.cc \
|
|
|
|
libretroshare/serialiser/rsstatusitem_test.cc \
|
|
|
|
libretroshare/serialiser/rsnxsitems_test.cc \
|
|
|
|
libretroshare/serialiser/rsgxsiditem_test.cc \
|
|
|
|
libretroshare/serialiser/rsphotoitem_test.cc \
|
|
|
|
libretroshare/serialiser/tlvbase_test2.cc \
|
|
|
|
libretroshare/serialiser/tlvrandom_test.cc \
|
|
|
|
libretroshare/serialiser/tlvbase_test.cc \
|
|
|
|
libretroshare/serialiser/tlvstack_test.cc \
|
|
|
|
libretroshare/serialiser/tlvitems_test.cc \
|
2015-01-11 17:19:32 -05:00
|
|
|
libretroshare/serialiser/rsgrouteritem_test.cc \
|
2014-04-05 03:27:18 -04:00
|
|
|
libretroshare/serialiser/tlvtypes_test.cc \
|
|
|
|
libretroshare/serialiser/tlvkey_test.cc \
|
|
|
|
libretroshare/serialiser/support.cc \
|
|
|
|
libretroshare/serialiser/rstlvutil.cc \
|
|
|
|
|
|
|
|
# Still to convert these.
|
|
|
|
# libretroshare/serialiser/rsconfigitem_test.cc \
|
|
|
|
# libretroshare/serialiser/rsgrouteritem_test.cc \
|
|
|
|
|
|
|
|
|
|
|
|
################################## GXS #####################################
|
|
|
|
|
|
|
|
HEADERS += libretroshare/gxs/common/data_support.h \
|
|
|
|
|
|
|
|
SOURCES += libretroshare/gxs/common/data_support.cc \
|
|
|
|
|
2014-04-19 06:20:07 -04:00
|
|
|
HEADERS += libretroshare/gxs/nxs_test/nxsdummyservices.h \
|
2014-04-26 06:07:25 -04:00
|
|
|
libretroshare/gxs/nxs_test/nxsgrptestscenario.h \
|
|
|
|
libretroshare/gxs/nxs_test/nxsmsgtestscenario.h \
|
2014-04-19 06:20:07 -04:00
|
|
|
libretroshare/gxs/nxs_test/nxsgrpsync_test.h \
|
|
|
|
libretroshare/gxs/nxs_test/nxsmsgsync_test.h \
|
|
|
|
libretroshare/gxs/nxs_test/nxstesthub.h \
|
2014-05-27 17:30:23 -04:00
|
|
|
libretroshare/gxs/nxs_test/nxstestscenario.h \
|
|
|
|
libretroshare/gxs/nxs_test/nxsgrpsyncdelayed.h
|
2014-04-19 06:20:07 -04:00
|
|
|
|
|
|
|
SOURCES += libretroshare/gxs/nxs_test/nxsdummyservices.cc \
|
2014-04-26 06:07:25 -04:00
|
|
|
libretroshare/gxs/nxs_test/nxsgrptestscenario.cc \
|
|
|
|
libretroshare/gxs/nxs_test/nxsmsgtestscenario.cc \
|
2014-04-19 06:20:07 -04:00
|
|
|
libretroshare/gxs/nxs_test/nxstesthub.cc \
|
2014-05-18 12:44:19 -04:00
|
|
|
libretroshare/gxs/nxs_test/rsgxsnetservice_test.cc \
|
|
|
|
libretroshare/gxs/nxs_test/nxsmsgsync_test.cc \
|
2014-05-27 17:30:23 -04:00
|
|
|
libretroshare/gxs/nxs_test/nxsgrpsync_test.cc \
|
|
|
|
libretroshare/gxs/nxs_test/nxsgrpsyncdelayed.cc
|
|
|
|
|
2014-04-05 03:27:18 -04:00
|
|
|
HEADERS += libretroshare/gxs/gen_exchange/genexchangetester.h \
|
|
|
|
libretroshare/gxs/gen_exchange/gxspublishmsgtest.h \
|
|
|
|
libretroshare/gxs/gen_exchange/genexchangetestservice.h \
|
|
|
|
libretroshare/gxs/gen_exchange/gxspublishgrouptest.h \
|
|
|
|
libretroshare/gxs/gen_exchange/rsdummyservices.h \
|
2014-07-20 07:21:06 -04:00
|
|
|
libretroshare/gxs/gen_exchange/gxsteststats.cpp
|
2014-04-05 03:27:18 -04:00
|
|
|
|
|
|
|
# libretroshare/gxs/gen_exchange/gxsmsgrelatedtest.h \
|
|
|
|
|
|
|
|
SOURCES += libretroshare/gxs/gen_exchange/gxspublishgrouptest.cc \
|
2014-07-20 07:21:06 -04:00
|
|
|
libretroshare/gxs/gen_exchange/gxsteststats.cpp \
|
2014-04-05 03:27:18 -04:00
|
|
|
libretroshare/gxs/gen_exchange/gxspublishmsgtest.cc \
|
|
|
|
libretroshare/gxs/gen_exchange/rsdummyservices.cc \
|
|
|
|
libretroshare/gxs/gen_exchange/rsgenexchange_test.cc \
|
|
|
|
libretroshare/gxs/gen_exchange/genexchangetester.cc \
|
|
|
|
libretroshare/gxs/gen_exchange/genexchangetestservice.cc \
|
|
|
|
|
2014-05-17 11:06:19 -04:00
|
|
|
SOURCES += libretroshare/gxs/security/gxssecurity_test.cc
|
|
|
|
|
2014-04-05 03:27:18 -04:00
|
|
|
# libretroshare/gxs/gen_exchange/gxsmsgrelatedtest.cc \
|
|
|
|
|
|
|
|
HEADERS += libretroshare/gxs/data_service/rsdataservice_test.h \
|
|
|
|
|
|
|
|
SOURCES += libretroshare/gxs/data_service/rsdataservice_test.cc \
|
|
|
|
libretroshare/gxs/data_service/rsgxsdata_test.cc \
|
|
|
|
|
|
|
|
|
|
|
|
################################ dbase #####################################
|
|
|
|
|
|
|
|
|
|
|
|
SOURCES += libretroshare/dbase/fisavetest.cc \
|
|
|
|
libretroshare/dbase/fitest2.cc \
|
|
|
|
libretroshare/dbase/searchtest.cc \
|
|
|
|
|
|
|
|
# libretroshare/dbase/ficachetest.cc \
|
|
|
|
# libretroshare/dbase/fimontest.cc \
|
|
|
|
|
|
|
|
|
2014-04-10 04:46:15 -04:00
|
|
|
############################### services ###################################
|
|
|
|
|
|
|
|
SOURCES += libretroshare/services/status/status_test.cc \
|
|
|
|
|
2014-04-12 03:24:17 -04:00
|
|
|
############################### gxs ########################################
|
|
|
|
|
|
|
|
HEADERS += libretroshare/services/gxs/rsgxstestitems.h \
|
|
|
|
libretroshare/services/gxs/gxstestservice.h \
|
|
|
|
libretroshare/services/gxs/GxsIsolatedServiceTester.h \
|
2014-04-13 08:21:51 -04:00
|
|
|
libretroshare/services/gxs/GxsPeerNode.h \
|
|
|
|
libretroshare/services/gxs/GxsPairServiceTester.h \
|
2014-04-27 09:26:14 -04:00
|
|
|
libretroshare/services/gxs/FakePgpAuxUtils.h \
|
2014-04-12 03:24:17 -04:00
|
|
|
|
2014-05-04 08:50:19 -04:00
|
|
|
# libretroshare/services/gxs/RsGxsNetServiceTester.h \
|
|
|
|
|
2014-04-12 03:24:17 -04:00
|
|
|
SOURCES += libretroshare/services/gxs/rsgxstestitems.cc \
|
|
|
|
libretroshare/services/gxs/gxstestservice.cc \
|
|
|
|
libretroshare/services/gxs/GxsIsolatedServiceTester.cc \
|
2014-04-13 08:21:51 -04:00
|
|
|
libretroshare/services/gxs/GxsPeerNode.cc \
|
|
|
|
libretroshare/services/gxs/GxsPairServiceTester.cc \
|
2014-04-27 09:26:14 -04:00
|
|
|
libretroshare/services/gxs/FakePgpAuxUtils.cc \
|
2014-04-12 03:24:17 -04:00
|
|
|
libretroshare/services/gxs/nxsbasic_test.cc \
|
2014-04-13 08:21:51 -04:00
|
|
|
libretroshare/services/gxs/nxspair_tests.cc \
|
2014-04-27 09:26:14 -04:00
|
|
|
libretroshare/services/gxs/gxscircle_tests.cc \
|
2014-05-04 08:50:19 -04:00
|
|
|
|
|
|
|
# libretroshare/services/gxs/gxscircle_mintest.cc \
|
|
|
|
|
|
|
|
|
|
|
|
# libretroshare/services/gxs/RsGxsNetServiceTester.cc \
|