From 4fac1bd6d4f5d99d2adc577c3eb6158a2601a3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BENEDEK=20L=C3=A1szl=C3=B3?= Date: Fri, 31 May 2024 21:45:58 +0200 Subject: [PATCH] win32 support --- src/graph/plugins/http/CMakeLists.txt | 8 +++++++- test/test.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/graph/plugins/http/CMakeLists.txt b/src/graph/plugins/http/CMakeLists.txt index 5e60b87..2c11cab 100644 --- a/src/graph/plugins/http/CMakeLists.txt +++ b/src/graph/plugins/http/CMakeLists.txt @@ -2,5 +2,11 @@ find_package(nlohmann_json 3 REQUIRED) file(GLOB_RECURSE HTTP_SOURCES "./*.cpp") add_library(http SHARED ${HTTP_SOURCES}) -target_link_libraries(http librum.so libflags-cpp.so nlohmann_json::nlohmann_json) +set(LIB_PATH "/usr/local/lib") +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") \ No newline at end of file diff --git a/test/test.py b/test/test.py index 1db0197..a16cc36 100755 --- a/test/test.py +++ b/test/test.py @@ -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("-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("-a", action="store", dest="address", help="server address", type=str, required=False, default="localhost") + parser.add_argument("-a", action="store", dest="address", help="server address", type=str, required=False, default="127.0.0.1") args = parser.parse_args() if args.test == "sine":