From 90319f2cb7ab4be228fb25f19836f4f85e83d07b Mon Sep 17 00:00:00 2001 From: pingkai Date: Sun, 26 Apr 2020 17:11:52 +0800 Subject: [PATCH] test(communication): fix linux build error Signed-off-by: pingkai --- framework/tests/communication/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/framework/tests/communication/CMakeLists.txt b/framework/tests/communication/CMakeLists.txt index 141420c49..083253791 100644 --- a/framework/tests/communication/CMakeLists.txt +++ b/framework/tests/communication/CMakeLists.txt @@ -25,6 +25,17 @@ target_include_directories(communicationTest PRIVATE ) target_link_directories(communicationTest PRIVATE ${COMMON_LIB_DIR}) + +if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(communicationTest PUBLIC + bcrypt + ) +else () + target_link_libraries(communicationTest PUBLIC + z + dl + ) +endif () if (APPLE) target_link_libraries( communicationTest PUBLIC