aboutsummaryrefslogtreecommitdiff
path: root/src/local
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-10-15 18:57:47 +0200
committerJan200101 <sentrycraft123@gmail.com>2023-10-15 18:57:47 +0200
commit2dace4e0e57df5506a31687b44a48fa94c9f9071 (patch)
treeee64a4c5d875ce43b15835c8790492109583ef80 /src/local
parent3583254d59ecc7ca5534c7759224a806de1ff5a8 (diff)
downloadSouthRPC-2dace4e0e57df5506a31687b44a48fa94c9f9071.tar.gz
SouthRPC-2dace4e0e57df5506a31687b44a48fa94c9f9071.zip
Add error checking, local testing, default convar handler
Diffstat (limited to 'src/local')
-rw-r--r--src/local/CMakeLists.txt16
-rw-r--r--src/local/main.cpp12
2 files changed, 28 insertions, 0 deletions
diff --git a/src/local/CMakeLists.txt b/src/local/CMakeLists.txt
new file mode 100644
index 0000000..8e35f2b
--- /dev/null
+++ b/src/local/CMakeLists.txt
@@ -0,0 +1,16 @@
+
+find_package(spdlog REQUIRED)
+find_package(NorthstarPluginABI REQUIRED)
+
+add_executable(LocalRPC
+ $<TARGET_OBJECTS:SouthRPC>
+ "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
+)
+target_include_directories(LocalRPC PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
+target_link_libraries(LocalRPC rapidjson_header)
+target_link_libraries(LocalRPC ws2_32)
+target_precompile_headers(LocalRPC PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../ns_plugin.h")
+
+target_link_libraries(LocalRPC spdlog::spdlog_header_only)
+target_include_directories(LocalRPC PRIVATE ${NS_DLL_DIR})
+target_include_directories(LocalRPC PRIVATE ${NS_PLUG_DIR}) \ No newline at end of file
diff --git a/src/local/main.cpp b/src/local/main.cpp
new file mode 100644
index 0000000..aa1b990
--- /dev/null
+++ b/src/local/main.cpp
@@ -0,0 +1,12 @@
+#include "ns_plugin.h"
+#include "plugin.h"
+#include "handler.h"
+
+int main()
+{
+ spdlog::info("Main");
+
+ Plugin plugin(nullptr, nullptr);
+
+ plugin.server->run();
+} \ No newline at end of file