Skip to content

Commit

Permalink
test(push): gethostname requires Winsock library
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Dec 8, 2022
1 parent 89e79f2 commit 00c0334
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/project-import-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ find_package(prometheus-cpp CONFIG REQUIRED)

if(PROMETHEUS_CPP_ENABLE_PUSH)
add_executable(sample-client sample_client.cc)
target_link_libraries(sample-client PRIVATE prometheus-cpp::push)
target_link_libraries(sample-client PRIVATE prometheus-cpp::push $<$<BOOL:${WIN32}>:Ws2_32>)
endif()

if(PROMETHEUS_CPP_ENABLE_PULL)
Expand Down
2 changes: 1 addition & 1 deletion cmake/project-import-pkgconfig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pkg_check_modules(PROMETHEUS_CPP_PULL IMPORTED_TARGET prometheus-cpp-pull)

if(PROMETHEUS_CPP_PUSH_FOUND)
add_executable(sample-client sample_client.cc)
target_link_libraries(sample-client PRIVATE PkgConfig::PROMETHEUS_CPP_PUSH)
target_link_libraries(sample-client PRIVATE PkgConfig::PROMETHEUS_CPP_PUSH $<$<BOOL:${WIN32}>:Ws2_32>)
endif()

if(PROMETHEUS_CPP_PULL_FOUND)
Expand Down
1 change: 1 addition & 0 deletions push/tests/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ add_executable(sample_client
target_link_libraries(sample_client
PRIVATE
${PROJECT_NAME}::push
$<$<BOOL:${WIN32}>:Ws2_32>
)

0 comments on commit 00c0334

Please sign in to comment.