Add hedera proto files (in submodule) and in build config

This commit is contained in:
Dario 2020-05-28 15:15:28 +02:00
parent 1bf4949fc0
commit c1f8c061c7
7 changed files with 21 additions and 5 deletions

2
.gitmodules vendored
View File

@ -6,7 +6,7 @@
url = https://github.com/MariaDB/mariadb-connector-c.git
[submodule "src/proto"]
path = src/proto
url = ssh://git@***REMOVED***/~/gradido_protocol
url = ssh://git@***REMOVED***:18521/~/_protobuf/gradido_protobuf
[submodule "dependencies/iroha-ed25519"]
path = dependencies/iroha-ed25519
url = ssh://git@***REMOVED***/~/forks/iroha-ed25519.git

View File

@ -31,6 +31,8 @@ FILE(GLOB CRYPTO "src/cpp/Crypto/*.h" "src/cpp/Crypto/*.cpp")
FILE(GLOB MAIN "src/cpp/*.cpp" "src/cpp/*.c" "src/cpp/*.h")
FILE(GLOB MYSQL "src/cpp/MySQL/*.cpp" "src/cpp/MySQL/*.h" "src/cpp/MySQL/Poco/*.h")
FILE(GLOB PROTO_GRADIDO "src/cpp/proto/gradido/*.cc" "src/cpp/proto/gradido/*.h")
FILE(GLOB PROTO_HEDERA "src/cpp/proto/hedera/*.cc" "src/cpp/proto/hedera/*.h")
# used only for test project
FILE(GLOB TEST "src/cpp/test/*.cpp" "src/cpp/test/*.h")
@ -38,14 +40,15 @@ SET(LOCAL_SRCS
${CONTROLLER} ${TINF} ${MAIN} ${HTTPInterface}
${JSONInterface} ${CRYPTO} ${MODEL} ${MODEL_TABLE} ${MODEL_EMAIL}
${SINGLETON_MANAGER} ${LIB_SRC} ${MYSQL} ${TASKS}
${PROTO_GRADIDO}
${PROTO_GRADIDO} ${PROTO_HEDERA}
)
aux_source_directory("src/cpp" LOCAL_SRCS)
if(MSVC)
# src
source_group("controller" FILES ${CONTROLLER})
source_group("proto" FILES ${PROTO_GRADIDO})
source_group("proto\\gradido" FILES ${PROTO_GRADIDO})
source_group("proto\\hedera" FILES ${PROTO_HEDERA})
source_group("tinf" FILES ${TINF})
source_group("crypto" FILES ${CRYPTO})
source_group("tasks" FILES ${TASKS})

3
README
View File

@ -16,12 +16,13 @@ cd ../../../
cd dependencies/mariadb-connector-c
mkdir build
cd build
cmake ..
cmake -DWITH_SSL=OFF ..
cd ../../../
# get more dependencies with conan (need conan from https://conan.io/)
mkdir build && cd build
conan remote add inexor https://api.bintray.com/conan/inexorgame/inexor-conan
# conan install .. -s build_type=Debug
conan install ..

View File

@ -7,3 +7,11 @@ if [ ! -d "./src/cpp/proto/gradido" ] ; then
fi
protoc --cpp_out=./src/cpp/proto/gradido --proto_path=./src/proto/gradido ./src/proto/gradido/*.proto
if [ ! -d "./src/cpp/proto/hedera" ] ; then
mkdir ./src/cpp/proto/hedera
fi
protoc --cpp_out=./src/cpp/proto/hedera --proto_path=./src/proto/hedera/hedera-protobuf/src/main/proto ./src/proto/hedera/hedera-protobuf/src/main/proto/*.proto

View File

@ -49,6 +49,7 @@ namespace ServerConfig {
std::string g_versionString = "";
bool g_disableEmail = false;
ServerSetupType g_ServerSetupType = SERVER_TYPE_PRODUCTION;
std::string g_gRPCRelayServerFullURL;
#ifdef __linux__
#include <stdio.h>
@ -210,6 +211,8 @@ namespace ServerConfig {
auto serverSetupTypeString = cfg.getString("ServerSetupType", "");
g_ServerSetupType = getServerSetupTypeFromString(serverSetupTypeString);
g_gRPCRelayServerFullURL = cfg.getString("grpc.server", "");
return true;
}

View File

@ -58,6 +58,7 @@ namespace ServerConfig {
extern std::string g_versionString;
extern bool g_disableEmail;
extern ServerSetupType g_ServerSetupType;
extern std::string g_gRPCRelayServerFullURL;
bool loadMnemonicWordLists();
bool initServerCrypto(const Poco::Util::LayeredConfiguration& cfg);

@ -1 +1 @@
Subproject commit 9004e6978ac3dafcc635b2ffcf8bc6a156451cca
Subproject commit 9149b4552de8da88d6a3303b24b751630ce54bf5