mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-21 21:59:02 -04:00
Multiple improvements to build process
Restructure and document retroshare.pri variables and helper functions Link sqlite statically like other libraries on Android qmake has multiple win32-* specs match them correctly Move a buch of generic thing to retroshare.pri instead of having them replocated accross project specific .pro Fix retroshare-gui too many symbols exported on windows liking error by adding QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL Rename retroshare-gui/src/util/win32.h because the name is too prone to confusion and build conflicts libreasapi avoid usage of cretar_prl link_prl that seems unreliable on some platforms libreasapi rename LIBRESAPI_QT to more understendable LIBRESAPI_SETTINGS Use use_*.pri instead of copy pasting error prone qmake snippets around Expose bitdht option to retroshare.pri Add RS_THREAD_LIB qmake variable for better crossplatform support Move debug and profiling generic options to retroshare.pri (avoid copy/pasting) Remove Qt script module in qmake as it is not available anymore
This commit is contained in:
parent
b36cb1ef17
commit
4876a0ea3b
21 changed files with 502 additions and 466 deletions
|
@ -9,8 +9,8 @@ QMAKE_CXXFLAGS *= -Wall -Werror -W
|
|||
|
||||
TARGET = ops
|
||||
DESTDIR = lib
|
||||
DEPENDPATH += . $$INC_DIR
|
||||
INCLUDEPATH += . $$INC_DIR
|
||||
|
||||
!include(use_openpgpsdk.pri):error("Including")
|
||||
|
||||
#################################### Windows #####################################
|
||||
|
||||
|
@ -18,7 +18,11 @@ linux-* {
|
|||
OBJECTS_DIR = temp/linux/obj
|
||||
}
|
||||
|
||||
win32 {
|
||||
win32-g++ {
|
||||
|
||||
HEADERS += openpgpsdk/opsstring.h
|
||||
SOURCES += openpgpsdk/opsstring.c
|
||||
|
||||
DEFINES *= WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||
|
||||
# Switch off optimization for release version
|
||||
|
@ -27,9 +31,13 @@ win32 {
|
|||
QMAKE_CFLAGS_RELEASE -= -O2
|
||||
QMAKE_CFLAGS_RELEASE += -O0
|
||||
|
||||
# Switch on optimization for debug version
|
||||
#QMAKE_CXXFLAGS_DEBUG += -O2
|
||||
#QMAKE_CFLAGS_DEBUG += -O2
|
||||
mLibs = bz2 z ssl crypto
|
||||
static {
|
||||
LIBS += $$linkStaticLibs(mLibs)
|
||||
PRE_TARGETDEPS += $$pretargetStaticLibs(mLibs)
|
||||
} else {
|
||||
LIBS += $$linkDynamicLibs(mLibs)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,9 +82,6 @@ HEADERS += openpgpsdk/writer.h \
|
|||
openpgpsdk/parse_local.h \
|
||||
openpgpsdk/keyring_local.h \
|
||||
openpgpsdk/opsdir.h
|
||||
win32{
|
||||
HEADERS += openpgpsdk/opsstring.h
|
||||
}
|
||||
|
||||
SOURCES += openpgpsdk/accumulate.c \
|
||||
openpgpsdk/compress.c \
|
||||
|
@ -116,9 +121,7 @@ SOURCES += openpgpsdk/accumulate.c \
|
|||
openpgpsdk/writer_skey_checksum.c \
|
||||
openpgpsdk/writer_stream_encrypt_se_ip.c \
|
||||
openpgpsdk/opsdir.c
|
||||
win32{
|
||||
SOURCES += openpgpsdk/opsstring.c
|
||||
}
|
||||
|
||||
|
||||
################################# Android #####################################
|
||||
|
||||
|
|
20
openpgpsdk/src/use_openpgpsdk.pri
Normal file
20
openpgpsdk/src/use_openpgpsdk.pri
Normal file
|
@ -0,0 +1,20 @@
|
|||
DEPENDPATH *= $$system_path($$clean_path($${PWD}/../../openpgpsdk/src))
|
||||
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../openpgpsdk/src))
|
||||
LIBS *= -L$$system_path($$clean_path($${OUT_PWD}/../../openpgpsdk/src/lib/)) -lops
|
||||
|
||||
!equals(TARGET, ops):PRE_TARGETDEPS *= $$system_path($$clean_path($${OUT_PWD}/../../openpgpsdk/src/lib/libops.a))
|
||||
|
||||
sLibs =
|
||||
mLibs = ssl crypto z bz2
|
||||
dLibs =
|
||||
|
||||
static {
|
||||
sLibs *= $$mLibs
|
||||
} else {
|
||||
dLibs *= $$mLibs
|
||||
}
|
||||
|
||||
LIBS += $$linkStaticLibs(sLibs)
|
||||
PRE_TARGETDEPS += $$pretargetStaticLibs(sLibs)
|
||||
|
||||
LIBS += $$linkDynamicLibs(dLibs)
|
Loading…
Add table
Add a link
Reference in a new issue