Added new config "libretroshare_shared" to build libretroshare as shared library (default off) based on changes from ET. Activated for Windows build with plugins to fix the link error (ld.exe: Error: export ordinal too large) due to too many exported symbols.

This commit is contained in:
thunder2 2020-11-09 16:30:28 +01:00
parent 1895abfb24
commit 76b22ada5c
5 changed files with 17 additions and 4 deletions

View file

@ -4,7 +4,11 @@
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
TEMPLATE = lib
CONFIG += staticlib
libretroshare_shared {
CONFIG += shared
} else {
CONFIG += staticlib
}
CONFIG -= qt
TARGET = retroshare
TARGET_PRL = libretroshare
@ -242,7 +246,7 @@ win32-g++|win32-clang-g++ {
QMAKE_CC = $${QMAKE_CXX}
OBJECTS_DIR = temp/obj
MOC_DIR = temp/moc
DEFINES *= STATICLIB
!libretroshare_shared:DEFINES *= STATICLIB
# Switch on extra warnings
QMAKE_CFLAGS += -Wextra

View file

@ -6,10 +6,10 @@ RS_BUILD_PATH=$$clean_path($${OUT_PWD}/../../)
DEPENDPATH *= $$clean_path($${RS_SRC_PATH}/libretroshare/src/)
INCLUDEPATH *= $$clean_path($${RS_SRC_PATH}/libretroshare/src)
LIBS *= -L$$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/) -lretroshare
equals(TARGET, retroshare):equals(TEMPLATE, lib){
} else {
LIBS *= -L$$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/) -lretroshare
PRE_TARGETDEPS *= $$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/libretroshare.a)
}