diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt index 830d6816c7f..5476e95f874 100755 --- a/lib/cpp/CMakeLists.txt +++ b/lib/cpp/CMakeLists.txt @@ -24,7 +24,7 @@ set(SYSLIBS "") set(package_deps Boost) set(boost_components) -list(APPEND SYSLIBS "${Boost_LIBRARIES}") +list(APPEND SYSLIBS Boost::boost) # Create the thrift C++ library set( thriftcpp_SOURCES @@ -49,10 +49,8 @@ set( thriftcpp_SOURCES src/thrift/transport/TSocket.cpp src/thrift/transport/TPipe.cpp src/thrift/transport/TPipeServer.cpp - src/thrift/transport/TSSLSocket.cpp src/thrift/transport/TSocketPool.cpp src/thrift/transport/TServerSocket.cpp - src/thrift/transport/TSSLServerSocket.cpp src/thrift/transport/TTransportUtils.cpp src/thrift/transport/TBufferTransports.cpp src/thrift/server/TServer.cpp @@ -165,9 +163,9 @@ include(ThriftMacros) ADD_LIBRARY_THRIFT(thrift ${thriftcpp_SOURCES} ${thriftcpp_threads_SOURCES}) if(WIN32) - TARGET_LINK_LIBRARIES_THRIFT(thrift ${SYSLIBS} ws2_32) + TARGET_LINK_LIBRARIES_THRIFT(thrift PUBLIC ${SYSLIBS} ws2_32) else() - TARGET_LINK_LIBRARIES_THRIFT(thrift ${SYSLIBS}) + TARGET_LINK_LIBRARIES_THRIFT(thrift PUBLIC ${SYSLIBS}) endif() if(WITH_LIBEVENT)