cpp-mcp/examples/CMakeLists.txt

21 lines
725 B
CMake
Raw Normal View History

2025-03-08 01:50:39 +08:00
cmake_minimum_required(VERSION 3.10)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(TARGET client_example)
add_executable(${TARGET} client_example.cpp)
install(TARGETS ${TARGET} RUNTIME)
2025-03-08 22:49:19 +08:00
target_link_libraries(${TARGET} PRIVATE mcp)
2025-03-08 01:50:39 +08:00
target_compile_features(${TARGET} PRIVATE cxx_std_17)
set(TARGET server_example)
2025-03-08 22:49:19 +08:00
add_executable(${TARGET} server_example.cpp)
2025-03-08 01:50:39 +08:00
install(TARGETS ${TARGET} RUNTIME)
2025-03-08 22:49:19 +08:00
target_link_libraries(${TARGET} PRIVATE mcp)
2025-03-08 01:50:39 +08:00
target_compile_features(${TARGET} PRIVATE cxx_std_17)
2025-03-08 22:49:19 +08:00
# Create a directory for files if it doesn't exist
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/files)
# Copy example files if needed
# file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/example_files/ DESTINATION ${CMAKE_BINARY_DIR}/files)