Skip to content

Commit

Permalink
[Minor] HotFix the link error of libcurl when building test (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
acezen authored Apr 24, 2023
1 parent dc9cd98 commit f1fa8d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ if (BUILD_EXAMPLES)
if(OPENSSL_FOUND)
target_link_libraries(${E_NAME} PRIVATE OpenSSL::SSL)
endif()
if (CURL_FOUND)
target_link_libraries(${E_NAME} PRIVATE CURL::libcurl)
endif()
endforeach()
endif()

Expand Down Expand Up @@ -314,6 +317,9 @@ if (BUILD_TESTS)
if(OPENSSL_FOUND)
target_link_libraries(${target} PRIVATE OpenSSL::SSL)
endif()
if (CURL_FOUND)
target_link_libraries(${target} PRIVATE CURL::libcurl)
endif()
endmacro()

add_test(test_info SRCS test/test_info.cc)
Expand Down

0 comments on commit f1fa8d6

Please sign in to comment.