Fix CxCli and find_library.

GitOrigin-RevId: b3057195dc88b31fc87a1688f470d03e921df99f
This commit is contained in:
levlam 2018-02-22 18:44:22 +03:00
parent d1f1a14a37
commit 35d0ac2985
2 changed files with 4 additions and 2 deletions

View File

@ -210,7 +210,9 @@ set(TDUTILS_TEST_SOURCE
#LIBRARIES
add_library(tdutils STATIC ${TDUTILS_SOURCE})
if (WIN32)
target_link_libraries(tdutils PRIVATE ws2_32 Mswsock)
find_library(WS2_32_LIBRARY ws2_32)
find_library(MSWSOCK_LIBRARY Mswsock)
target_link_libraries(tdutils PRIVATE ${WS2_32_LIBRARY} ${MSWSOCK_LIBRARY})
endif()
if (NOT CMAKE_CROSSCOMPILING)
add_dependencies(tdutils tdmime_auto)

View File

@ -49,7 +49,7 @@ public:
value = it->second;
return true;
}
void Remove(Key key, Value &value) {
void TryRemove(Key key, Value &value) {
std::lock_guard<std::mutex> guard(mutex_);
impl_.erase(key);
}