21 lines
725 B
CMake
21 lines
725 B
CMake
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)
|
|
target_link_libraries(${TARGET} PRIVATE mcp)
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|
|
|
|
set(TARGET server_example)
|
|
add_executable(${TARGET} server_example.cpp)
|
|
install(TARGETS ${TARGET} RUNTIME)
|
|
target_link_libraries(${TARGET} PRIVATE mcp)
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|
|
|
|
# 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) |