cpp-mcp/src/CMakeLists.txt

28 lines
591 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

set(TARGET mcp)
add_library(${TARGET} STATIC
mcp_client.cpp
../include/mcp_client.h
mcp_message.cpp
../include/mcp_message.h
mcp_resource.cpp
../include/mcp_resource.h
mcp_server.cpp
../include/mcp_server.h
mcp_tool.cpp
../include/mcp_tool.h
mcp_sse_server.cpp
../include/mcp_sse_server.h
mcp_sse_client.cpp
../include/mcp_sse_client.h
)
target_link_libraries(${TARGET} PUBLIC
Threads::Threads
)
# 如果找到OpenSSL链接OpenSSL库
if(OPENSSL_FOUND)
target_link_libraries(${TARGET} PUBLIC ${OPENSSL_LIBRARIES})
endif()