From 9102a97e574c23b739819df29031bb073cfc3b56 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sun, 15 Apr 2018 13:41:52 +0200 Subject: [PATCH] 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 --- src/libbitdht.pro | 17 ++--------------- src/use_libbitdht.pri | 5 +++++ 2 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 src/use_libbitdht.pri diff --git a/src/libbitdht.pro b/src/libbitdht.pro index ad6986f..d9e5816 100644 --- a/src/libbitdht.pro +++ b/src/libbitdht.pro @@ -6,23 +6,10 @@ CONFIG -= qt TARGET = bitdht DESTDIR = lib +!include("use_libbitdht.pri"):error("Including") + QMAKE_CXXFLAGS *= -Wall -DBE_DEBUG -profiling { - QMAKE_CXXFLAGS -= -fomit-frame-pointer - QMAKE_CXXFLAGS *= -pg -g -fno-omit-frame-pointer -} - -release { - # not much here yet. -} - -#CONFIG += debug -debug { - QMAKE_CXXFLAGS -= -O2 -fomit-frame-pointer - QMAKE_CXXFLAGS *= -g -fno-omit-frame-pointer -} - # treat warnings as error for better removing #QMAKE_CFLAGS += -Werror #QMAKE_CXXFLAGS += -Werror diff --git a/src/use_libbitdht.pri b/src/use_libbitdht.pri new file mode 100644 index 0000000..bbaf1d4 --- /dev/null +++ b/src/use_libbitdht.pri @@ -0,0 +1,5 @@ +DEPENDPATH *= $$system_path($$clean_path($${PWD}/../../libbitdht/src)) +INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../libbitdht/src)) +LIBS *= -L$$system_path($$clean_path($${OUT_PWD}/../../libbitdht/src/lib/)) -lbitdht + +!equals(TARGET, bitdht):PRE_TARGETDEPS *= $$system_path($$clean_path($${OUT_PWD}/../../libbitdht/src/lib/libbitdht.a))