oxen-core/external
Jason Rhinelander 70b9fed4fd Static builds: make usable binaries from cmake
This adds a static dependency script for libraries like boost, unbound,
etc. to cmake, invokable with:

    cmake .. -DBUILD_STATIC_DEPS=ON

which downloads and builds static versions of all our required
dependencies (boost, unbound, openssl, ncurses, etc.).  It also implies
-DSTATIC=ON to build other vendored deps (like miniupnpc, lokimq) as
static as well.

Unlike the contrib/depends system, this is easier to maintain (one
script using nicer cmake with functions instead of raw Makefile
spaghetti code), and isn't concerned with reproducible builds -- this
doesn't rebuild the compiler, for instance.  It also works with the
existing build system so that it is simply another way to invoke the
cmake build scripts but doesn't require any external tooling.

This works on Linux, Mac, and Windows.

Some random comments on this commit (for preserving history):

- Don't use target_link_libraries on imported targets.  Newer cmake is
fine with it, but Bionic's cmake doesn't like it but seems okay with
setting the properties directly.

- This rebuilds libzmq and libsodium, even though there is some
provision already within loki-core to do so: however, the existing
embedded libzmq fails with the static deps because it uses libzmq's
cmake build script, which relies on pkg-config to find libsodium which
ends up finding the system one (or not finding any), rather than the one
we build with DownloadLibSodium.  Since both libsodium and libzmq are
faily simple builds it seemed easiest to just add them to the cmake
static build rather than trying to shoehorn the current code into the
static build script.

- Half of the protobuf build system ignores CC/CXX just because Google,
and there's no documentation anywhere except for a random closed bug
report about needing to set these other variables (CC_FOR_BUILD,
CXX_FOR_BUILD) instead, but you need to.  Thanks Google.

- The boost build is set to output very little because even the minimum
-d1 output level spams ~15k lines of output just for the headers it
installs.
2020-06-15 12:49:33 -03:00
..
boost/archive boost: fix little/big endian compatibility 2019-09-04 14:54:00 +00:00
db_drivers Merge commit 'd0d76f771ac318046306cd2ef40e67d598d7429d' into MergeUpstream3 2020-05-21 14:32:11 +10:00
easylogging++ Merge commit 'c038cc8b791ffb4bcd5f13e47de1ea98815059fe' into MergeUpstream3 2020-05-28 12:23:19 +10:00
googletest@703bd9caab Update and submodule gtest 2020-06-09 23:06:54 -03:00
loki-mq@843dbc4e2c Static builds: make usable binaries from cmake 2020-06-15 12:49:33 -03:00
miniupnp@bd836936f7 Switch miniupnp from monero to upstream 2020-06-14 22:10:38 -03:00
randomx@81fda4ecea Update loki-randomXL checkout to latest version 2020-06-09 01:19:25 -03:00
rapidjson@67fac85e96 Update submodules and fix gcc 4.8.4 build (#296) 2018-10-23 11:55:02 +11:00
trezor-common@bff7fdfe43 RPC overhaul 2020-05-11 18:44:45 -03:00
CMakeLists.txt Static builds: make usable binaries from cmake 2020-06-15 12:49:33 -03:00