2018-05-21 14:17:54 -04:00
|
|
|
################################################################################
|
|
|
|
# uselibretroshare.pri #
|
|
|
|
# Copyright (C) 2018, Retroshare team <retroshare.team@gmailcom> #
|
|
|
|
# #
|
|
|
|
# This program is free software: you can redistribute it and/or modify #
|
2018-05-28 16:03:39 -04:00
|
|
|
# it under the terms of the GNU Lesser General Public License as #
|
2018-05-21 14:17:54 -04:00
|
|
|
# published by the Free Software Foundation, either version 3 of the #
|
|
|
|
# License, or (at your option) any later version. #
|
|
|
|
# #
|
|
|
|
# This program is distributed in the hope that it will be useful, #
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
2018-05-28 16:03:39 -04:00
|
|
|
# GNU Lesser General Public License for more details. #
|
2018-05-21 14:17:54 -04:00
|
|
|
# #
|
2018-05-28 16:03:39 -04:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License #
|
2018-05-21 14:17:54 -04:00
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
|
|
|
################################################################################
|
2018-09-20 16:24:05 -04:00
|
|
|
DEPENDPATH *= $$clean_path($${PWD}/../../libretroshare/src/)
|
|
|
|
INCLUDEPATH *= $$clean_path($${PWD}/../../libretroshare/src)
|
|
|
|
LIBS *= -L$$clean_path($${OUT_PWD}/../../libretroshare/src/lib/) -lretroshare
|
2018-04-15 07:41:52 -04:00
|
|
|
|
|
|
|
equals(TARGET, retroshare):equals(TEMPLATE, lib){
|
|
|
|
} else {
|
2018-09-20 16:24:05 -04:00
|
|
|
PRE_TARGETDEPS *= $$clean_path($$OUT_PWD/../../libretroshare/src/lib/libretroshare.a)
|
2018-04-15 07:41:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
!include("../../openpgpsdk/src/use_openpgpsdk.pri"):error("Including")
|
|
|
|
|
|
|
|
bitdht {
|
|
|
|
!include("../../libbitdht/src/use_libbitdht.pri"):error("Including")
|
|
|
|
}
|
|
|
|
|
2018-06-26 09:12:16 -04:00
|
|
|
# when rapidjson is mainstream on all distribs, we will not need the sources
|
|
|
|
# anymore in the meantime, they are part of the RS directory so that it is
|
|
|
|
# always possible to find them
|
2018-07-16 17:22:04 -04:00
|
|
|
RAPIDJSON_AVAILABLE = $$system(pkg-config --atleast-version 1.1 RapidJSON && echo yes)
|
|
|
|
isEmpty(RAPIDJSON_AVAILABLE) {
|
|
|
|
message("using built-in rapidjson")
|
2018-09-20 16:24:05 -04:00
|
|
|
INCLUDEPATH *= $$clean_path($${PWD}/../../rapidjson-1.1.0)
|
2018-07-16 17:22:04 -04:00
|
|
|
} else {
|
|
|
|
message("using systems rapidjson")
|
|
|
|
DEFINES *= HAS_RAPIDJSON
|
|
|
|
}
|
|
|
|
|
2018-06-26 09:12:16 -04:00
|
|
|
|
2018-04-15 07:41:52 -04:00
|
|
|
sLibs =
|
|
|
|
mLibs = $$RS_SQL_LIB ssl crypto $$RS_THREAD_LIB $$RS_UPNP_LIB
|
|
|
|
dLibs =
|
|
|
|
|
2018-06-23 11:13:38 -04:00
|
|
|
rs_jsonapi {
|
2018-09-20 16:24:05 -04:00
|
|
|
RS_SRC_PATH=$$clean_path($${PWD}/../../)
|
|
|
|
RS_BUILD_PATH=$$clean_path($${OUT_PWD}/../../)
|
|
|
|
RESTBED_SRC_PATH=$$clean_path($${RS_SRC_PATH}/supportlibs/restbed)
|
|
|
|
RESTBED_BUILD_PATH=$$clean_path($${RS_BUILD_PATH}/supportlibs/restbed)
|
2018-06-23 11:13:38 -04:00
|
|
|
|
2018-09-20 16:24:05 -04:00
|
|
|
INCLUDEPATH *= $$clean_path($${RESTBED_BUILD_PATH}/include/)
|
|
|
|
QMAKE_LIBDIR *= $$clean_path($${RESTBED_BUILD_PATH}/library/)
|
2018-06-23 11:13:38 -04:00
|
|
|
# Using sLibs would fail as librestbed.a is generated at compile-time
|
2018-09-20 16:24:05 -04:00
|
|
|
LIBS *= -L$$clean_path($${RESTBED_BUILD_PATH}/library/) -lrestbed
|
2018-09-28 18:15:10 -04:00
|
|
|
win32-g++:LIBS += -lwsock32
|
2018-06-23 11:13:38 -04:00
|
|
|
}
|
|
|
|
|
2018-04-15 07:41:52 -04:00
|
|
|
linux-* {
|
|
|
|
mLibs += dl
|
|
|
|
}
|
|
|
|
|
2018-06-09 12:06:14 -04:00
|
|
|
rs_deep_search {
|
|
|
|
mLibs += xapian
|
2018-07-23 15:54:07 -04:00
|
|
|
win32-g++:mLibs += rpcrt4
|
2018-06-09 12:06:14 -04:00
|
|
|
}
|
|
|
|
|
2018-04-15 07:41:52 -04:00
|
|
|
static {
|
|
|
|
sLibs *= $$mLibs
|
|
|
|
} else {
|
|
|
|
dLibs *= $$mLibs
|
|
|
|
}
|
|
|
|
|
|
|
|
LIBS += $$linkStaticLibs(sLibs)
|
|
|
|
PRE_TARGETDEPS += $$pretargetStaticLibs(sLibs)
|
|
|
|
|
|
|
|
LIBS += $$linkDynamicLibs(dLibs)
|