diff --git a/src/Makefile.am b/src/Makefile.am index 6fec94e96b..c745cab9bc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,6 +95,7 @@ BITCOIN_CORE_H = \ consensus/consensus.h \ core_io.h \ core_memusage.h \ + global/common.h \ httprpc.h \ httpserver.h \ indirectmap.h \ @@ -307,6 +308,7 @@ libbitcoin_common_a_SOURCES = \ compressor.cpp \ core_read.cpp \ core_write.cpp \ + global/common.cpp \ key.cpp \ keystore.cpp \ merkleblock.cpp \ diff --git a/src/global/common.cpp b/src/global/common.cpp new file mode 100644 index 0000000000..0fcb9d3002 --- /dev/null +++ b/src/global/common.cpp @@ -0,0 +1,15 @@ +// Copyright (c) 2017-2017 The Elements Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include "global/common.h" + +#include "assetsdir.h" + +CAssetsDir _gAssetsDir; +const CAssetsDir& gAssetsDir = _gAssetsDir; + +void InitGlobalAssetDir(const std::vector& assetsToInit) +{ + _gAssetsDir.InitFromStrings(assetsToInit); +} diff --git a/src/global/common.h b/src/global/common.h new file mode 100644 index 0000000000..b695434058 --- /dev/null +++ b/src/global/common.h @@ -0,0 +1,17 @@ +// Copyright (c) 2017-2017 The Elements Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_GLOBAL_COMMON_H +#define BITCOIN_GLOBAL_COMMON_H + +#include +#include + +class CAssetsDir; + +extern const CAssetsDir& gAssetsDir; + +void InitGlobalAssetDir(const std::vector& assetsToInit); + +#endif // BITCOIN_GLOBAL_COMMON_H