aboutsummaryrefslogtreecommitdiff
path: root/works/life/computer-network-experiment/CMakeLists.txt
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-02-12 15:55:21 +0800
committerYuqian Yang <crupest@crupest.life>2025-02-12 15:55:21 +0800
commit1ecfd0ab7f1f511268fd6404dbc110c3c277b48c (patch)
tree49449a4076ded9bd937a51679318edbe2a532cae /works/life/computer-network-experiment/CMakeLists.txt
parent55d8b025e8d6ea971e8ee5762c892405fedc316b (diff)
parentf8c10dd1fc55e60f35286475356e48c4f642eb63 (diff)
downloadcrupest-1ecfd0ab7f1f511268fd6404dbc110c3c277b48c.tar.gz
crupest-1ecfd0ab7f1f511268fd6404dbc110c3c277b48c.tar.bz2
crupest-1ecfd0ab7f1f511268fd6404dbc110c3c277b48c.zip
import(life): IMPORT crupest/life COMPLETE.
Diffstat (limited to 'works/life/computer-network-experiment/CMakeLists.txt')
-rw-r--r--works/life/computer-network-experiment/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/works/life/computer-network-experiment/CMakeLists.txt b/works/life/computer-network-experiment/CMakeLists.txt
new file mode 100644
index 0000000..2ffd481
--- /dev/null
+++ b/works/life/computer-network-experiment/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.20)
+
+set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake
+ CACHE STRING "Vcpkg toolchain file")
+
+project(network-experiment)
+
+set(CMAKE_CXX_STANDARD 17)
+
+find_package(fmt CONFIG REQUIRED)
+find_package(Microsoft.GSL CONFIG REQUIRED)
+add_library(base STATIC Common.cpp StringUtil.cpp IO.cpp ReadWriteLock.cpp)
+target_link_libraries(base PUBLIC Microsoft.GSL::GSL fmt::fmt Folly::folly)
+if(WIN32)
+target_link_libraries(base PUBLIC Ws2_32)
+endif()
+
+add_executable(client client.cpp)
+target_link_libraries(client PRIVATE base)
+
+add_executable(server server.cpp)
+find_package(folly CONFIG REQUIRED)
+target_link_libraries(server PRIVATE base)