win32 support

This commit is contained in:
BENEDEK László 2024-05-31 21:45:58 +02:00
parent 58fe69fd5d
commit 4fac1bd6d4
2 changed files with 8 additions and 2 deletions

View File

@ -2,5 +2,11 @@ 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_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) 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

@ -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="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() args = parser.parse_args()
if args.test == "sine": if args.test == "sine":