File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ option(
2222 OFF )
2323
2424# Build static and dynamic lib written in Rust by invoking `cargo`.
25+ # Imports `questdb_client` target.
2526add_subdirectory (corrosion)
2627corrosion_import_crate(
2728 MANIFEST_PATH Cargo.toml
@@ -30,6 +31,15 @@ corrosion_import_crate(
3031target_include_directories (
3132 questdb_client INTERFACE
3233 ${CMAKE_CURRENT_SOURCE_DIR} /include )
34+ if (WIN32 )
35+ set_target_properties (
36+ questdb_client-shared
37+ PROPERTIES
38+ DEFINE_SYMBOL "LINESENDER_DYN_LIB" )
39+ target_link_libraries (
40+ questdb_client-shared
41+ INTERFACE wsock32 ws2_32)
42+ endif (WIN32 )
3343
3444function (set_compile_flags TARGET_NAME)
3545 if (MSVC )
Original file line number Diff line number Diff line change @@ -32,25 +32,15 @@ extern "C" {
3232#include <stddef.h>
3333#include <stdbool.h>
3434
35- #if defined(LINESENDER_DYN_LIB )
36- # if defined(_MSC_VER )
37- # if defined(LINESENDER_EXPORTS )
38- # define LINESENDER_API __declspec(dllexport)
39- # else
40- # define LINESENDER_API __declspec(dllimport)
41- # endif
42- # elif (__GNUC__ >= 4 )
43- # define LINESENDER_API __attribute__ ((visibility("default")))
44- # else
45- # error "Compiler unsupported or badly detected."
46- # endif
35+ #if defined(LINESENDER_DYN_LIB ) && defined(_MSC_VER )
36+ # define LINESENDER_API __declspec(dllimport)
4737#else
4838# define LINESENDER_API
4939#endif
5040
5141
5242/////////// Error handling.
53- /** An error that occured when using the line sender. */
43+ /** An error that occurred when using the line sender. */
5444typedef struct line_sender_error line_sender_error ;
5545
5646/** Category of error. */
You can’t perform that action at this time.
0 commit comments