Compare commits

..

No commits in common. "4fac1bd6d4f5d99d2adc577c3eb6158a2601a3c8" and "3694ebdcde18833d863b64c13c7c9cd920e6f115" have entirely different histories.

6 changed files with 5 additions and 52 deletions

View File

@ -16,15 +16,8 @@ endif()
include_directories("${CMAKE_SOURCE_DIR}/inc") include_directories("${CMAKE_SOURCE_DIR}/inc")
option(ENABLE_PLUGINS "Enable plugins" ON)
option(ENABLE_SERVER "Enable server" ON)
# build plugins # build plugins
if(ENABLE_PLUGINS) add_subdirectory("${CMAKE_SOURCE_DIR}/src/graph/plugins")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/graph/plugins")
endif()
# build gui server # build gui server
if(ENABLE_SERVER) add_subdirectory("${CMAKE_SOURCE_DIR}/src/graph/server")
add_subdirectory("${CMAKE_SOURCE_DIR}/src/graph/server")
endif()

View File

@ -1,9 +1 @@
option(ENABLE_PLUGIN_HTTP "Enable http plugin" ON) add_subdirectory("./http")
if(ENABLE_PLUGIN_HTTP)
add_subdirectory("./http")
endif()
option(ENABLE_PLUGIN_STAR "Enable star plugin" ON)
if(ENABLE_PLUGIN_STAR)
add_subdirectory("./star")
endif()

View File

@ -2,11 +2,5 @@ find_package(nlohmann_json 3 REQUIRED)
file(GLOB_RECURSE HTTP_SOURCES "./*.cpp") file(GLOB_RECURSE HTTP_SOURCES "./*.cpp")
add_library(http SHARED ${HTTP_SOURCES}) add_library(http SHARED ${HTTP_SOURCES})
set(LIB_PATH "/usr/local/lib") target_link_libraries(http librum.so libflags-cpp.so nlohmann_json::nlohmann_json)
target_link_directories(http PUBLIC ${LIB_PATH})
if(WIN32)
target_link_libraries(http ${LIB_PATH}/librum.dll.a ${LIB_PATH}/libflags-cpp.dll.a nlohmann_json::nlohmann_json)
else()
target_link_libraries(http librum.so libflags-cpp.so nlohmann_json::nlohmann_json)
endif()
set_target_properties(http PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") set_target_properties(http PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")

View File

@ -1,3 +0,0 @@
file(GLOB_RECURSE STAR_SOURCES "./*.c")
add_library(star SHARED ${STAR_SOURCES})
set_target_properties(star PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")

View File

@ -1,23 +0,0 @@
#include <graph/plugins/plugin.h>
int run();
int destroy();
plugin_t plugin = {.version=1, .run_method=&run, .destroy_method=&destroy, .update_callback=0, .argc=0, .argv=0};
int run() {
point_t points[6] = {
{2/4.0, 2/2.0},
{3/4.0, 0/2.0},
{0/4.0, 1/2.0},
{4/4.0, 1/2.0},
{1/4.0, 0/2.0},
{2/4.0, 2/2.0}
};
plugin.update_callback(0, "star", points, 6);
return 0;
}
int destroy() { return 0; }

View File

@ -96,7 +96,7 @@ if __name__ == "__main__":
parser.add_argument("-c", action="store", dest="chart", help="chart id", type=int, required=True) parser.add_argument("-c", action="store", dest="chart", help="chart id", type=int, required=True)
parser.add_argument("-s", action="store", dest="series", help="series name", type=str, required=True) parser.add_argument("-s", action="store", dest="series", help="series name", type=str, required=True)
parser.add_argument("-p", action="store", dest="port", help="server port", type=int, required=False, default=8080) parser.add_argument("-p", action="store", dest="port", help="server port", type=int, required=False, default=8080)
parser.add_argument("-a", action="store", dest="address", help="server address", type=str, required=False, default="127.0.0.1") parser.add_argument("-a", action="store", dest="address", help="server address", type=str, required=False, default="localhost")
args = parser.parse_args() args = parser.parse_args()
if args.test == "sine": if args.test == "sine":