diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 721fc3c..0752877 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -38,6 +38,15 @@ if (NOT TARGET solanaceae_plugin) FetchContent_MakeAvailable(solanaceae_plugin) endif() +if (NOT TARGET solanaceae_object_store) + FetchContent_Declare(solanaceae_object_store + GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_object_store.git + GIT_TAG master + EXCLUDE_FROM_ALL + ) + FetchContent_MakeAvailable(solanaceae_object_store) +endif() + add_subdirectory(./toxcore) if (NOT TARGET solanaceae_toxcore) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 11b41e3..8729dfc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -37,6 +37,8 @@ target_link_libraries(totato PUBLIC solanaceae_tox_contacts solanaceae_tox_messages + solanaceae_object_store + nlohmann_json::nlohmann_json ) diff --git a/src/main.cpp b/src/main.cpp index c999f85..9d964eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -137,6 +138,8 @@ int main(int argc, char** argv) { const auto started_at = std::chrono::steady_clock::now(); auto last_time_tick = std::chrono::steady_clock::now(); + ObjectStore2 os; + std::string config_path {"config.json"}; // totato -p @@ -224,6 +227,8 @@ int main(int argc, char** argv) { PluginManager pm; { // setup plugin instances + g_provideInstance("ObjectStore2", "host", &os); + g_provideInstance("ConfigModelI", "host", &conf); g_provideInstance("Contact3Registry", "1", "host", &cr); g_provideInstance("RegistryMessageModel", "host", &rmm);