2018-05-21 20:17:54 +02: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 22:03:39 +02:00
|
|
|
# it under the terms of the GNU Lesser General Public License as #
|
2018-05-21 20:17:54 +02: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 22:03:39 +02:00
|
|
|
# GNU Lesser General Public License for more details. #
|
2018-05-21 20:17:54 +02:00
|
|
|
# #
|
2018-05-28 22:03:39 +02:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License #
|
2018-05-21 20:17:54 +02:00
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
|
|
|
################################################################################
|
2019-04-12 02:53:39 +02:00
|
|
|
RS_SRC_PATH=$$clean_path($${PWD}/../../)
|
|
|
|
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
|
2018-04-15 13:41:52 +02:00
|
|
|
|
|
|
|
equals(TARGET, retroshare):equals(TEMPLATE, lib){
|
|
|
|
} else {
|
2019-04-12 02:53:39 +02:00
|
|
|
PRE_TARGETDEPS *= $$clean_path($${RS_BUILD_PATH}/libretroshare/src/lib/libretroshare.a)
|
2018-04-15 13:41:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
!include("../../openpgpsdk/src/use_openpgpsdk.pri"):error("Including")
|
|
|
|
|
|
|
|
bitdht {
|
|
|
|
!include("../../libbitdht/src/use_libbitdht.pri"):error("Including")
|
|
|
|
}
|
|
|
|
|
2018-06-26 15:12:16 +02: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 23:22:04 +02:00
|
|
|
RAPIDJSON_AVAILABLE = $$system(pkg-config --atleast-version 1.1 RapidJSON && echo yes)
|
|
|
|
isEmpty(RAPIDJSON_AVAILABLE) {
|
2019-11-28 01:33:17 +01:00
|
|
|
message("using rapidjson from submodule")
|
2019-11-27 23:32:38 +01:00
|
|
|
INCLUDEPATH *= $$clean_path($${PWD}/../../supportlibs/rapidjson/include)
|
2018-07-16 23:22:04 +02:00
|
|
|
} else {
|
2019-11-27 23:32:38 +01:00
|
|
|
message("using system rapidjson")
|
2018-07-16 23:22:04 +02:00
|
|
|
}
|
|
|
|
|
2018-06-26 15:12:16 +02:00
|
|
|
|
2018-04-15 13:41:52 +02:00
|
|
|
sLibs =
|
|
|
|
mLibs = $$RS_SQL_LIB ssl crypto $$RS_THREAD_LIB $$RS_UPNP_LIB
|
|
|
|
dLibs =
|
|
|
|
|
2018-06-23 17:13:38 +02:00
|
|
|
rs_jsonapi {
|
2018-10-06 18:49:17 +02:00
|
|
|
no_rs_cross_compiling {
|
2018-10-05 22:29:49 +02:00
|
|
|
RESTBED_SRC_PATH=$$clean_path($${RS_SRC_PATH}/supportlibs/restbed)
|
|
|
|
RESTBED_BUILD_PATH=$$clean_path($${RS_BUILD_PATH}/supportlibs/restbed)
|
|
|
|
INCLUDEPATH *= $$clean_path($${RESTBED_BUILD_PATH}/include/)
|
2019-03-16 17:26:27 +01:00
|
|
|
DEPENDPATH *= $$clean_path($${RESTBED_BUILD_PATH}/include/)
|
|
|
|
QMAKE_LIBDIR *= $$clean_path($${RESTBED_BUILD_PATH}/)
|
2018-10-05 22:29:49 +02:00
|
|
|
# Using sLibs would fail as librestbed.a is generated at compile-time
|
2019-03-16 17:26:27 +01:00
|
|
|
LIBS *= -L$$clean_path($${RESTBED_BUILD_PATH}/) -lrestbed
|
2018-10-05 22:29:49 +02:00
|
|
|
} else:sLibs *= restbed
|
|
|
|
|
|
|
|
win32-g++:dLibs *= wsock32
|
2018-06-23 17:13:38 +02:00
|
|
|
}
|
|
|
|
|
2018-04-15 13:41:52 +02:00
|
|
|
linux-* {
|
|
|
|
mLibs += dl
|
|
|
|
}
|
|
|
|
|
2019-06-20 17:24:18 +02:00
|
|
|
rs_deep_channels_index | rs_deep_files_index {
|
2018-06-09 18:06:14 +02:00
|
|
|
mLibs += xapian
|
2018-07-23 21:54:07 +02:00
|
|
|
win32-g++:mLibs += rpcrt4
|
2018-06-09 18:06:14 +02:00
|
|
|
}
|
|
|
|
|
2019-06-20 17:24:18 +02:00
|
|
|
rs_deep_files_index_ogg {
|
|
|
|
mLibs += vorbisfile
|
|
|
|
}
|
|
|
|
|
2019-06-21 13:33:10 +02:00
|
|
|
rs_deep_files_index_flac {
|
|
|
|
mLibs += FLAC++
|
|
|
|
}
|
|
|
|
|
|
|
|
rs_deep_files_index_taglib {
|
|
|
|
mLibs += tag
|
|
|
|
}
|
|
|
|
|
2019-04-12 02:53:39 +02:00
|
|
|
rs_broadcast_discovery {
|
|
|
|
no_rs_cross_compiling {
|
|
|
|
UDP_DISCOVERY_SRC_PATH=$$clean_path($${RS_SRC_PATH}/supportlibs/udp-discovery-cpp/)
|
|
|
|
UDP_DISCOVERY_BUILD_PATH=$$clean_path($${RS_BUILD_PATH}/supportlibs/udp-discovery-cpp/)
|
|
|
|
INCLUDEPATH *= $$clean_path($${UDP_DISCOVERY_SRC_PATH})
|
|
|
|
DEPENDPATH *= $$clean_path($${UDP_DISCOVERY_BUILD_PATH})
|
|
|
|
QMAKE_LIBDIR *= $$clean_path($${UDP_DISCOVERY_BUILD_PATH})
|
|
|
|
# Using sLibs would fail as libudp-discovery.a is generated at compile-time
|
|
|
|
LIBS *= -L$$clean_path($${UDP_DISCOVERY_BUILD_PATH}) -ludp-discovery
|
|
|
|
} else:sLibs *= udp-discovery
|
|
|
|
|
|
|
|
win32-g++:dLibs *= wsock32
|
|
|
|
}
|
|
|
|
|
2018-04-15 13:41:52 +02:00
|
|
|
static {
|
|
|
|
sLibs *= $$mLibs
|
|
|
|
} else {
|
|
|
|
dLibs *= $$mLibs
|
|
|
|
}
|
|
|
|
|
|
|
|
LIBS += $$linkStaticLibs(sLibs)
|
|
|
|
PRE_TARGETDEPS += $$pretargetStaticLibs(sLibs)
|
|
|
|
|
|
|
|
LIBS += $$linkDynamicLibs(dLibs)
|
2018-10-05 22:29:49 +02:00
|
|
|
|
|
|
|
android-* {
|
|
|
|
## ifaddrs is missing on Android to add them don't use the one from
|
|
|
|
## https://github.com/morristech/android-ifaddrs
|
|
|
|
## because it crash, use QNetworkInterface from Qt instead
|
|
|
|
CONFIG *= qt
|
|
|
|
QT *= network
|
|
|
|
}
|