tmp
This commit is contained in:
parent
a88b22b177
commit
263bb3e3af
10 changed files with 374 additions and 117 deletions
|
|
@ -9,10 +9,15 @@ add_compile_options(-Wall -Wextra -Wpedantic)
|
|||
# Boost 및 의존성 찾기
|
||||
find_package(Boost REQUIRED COMPONENTS system)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(Protobuf REQUIRED)
|
||||
|
||||
# 컴파일 명령 추출 활성화 (LSP/IDE 용)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# proto 파일로부터 소스 코드(.pb.h, .pb.cc) 생성
|
||||
file(GLOB PROTO_FILES "${CMAKE_CURRENT_SOURCE_DIR}/proto/*.proto")
|
||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${PROTO_FILES})
|
||||
|
||||
add_executable(Server
|
||||
server/main.cpp
|
||||
server/NetworkService.cpp
|
||||
|
|
@ -20,14 +25,26 @@ add_executable(Server
|
|||
server/PacketHandler.cpp
|
||||
server/SessionManager.cpp
|
||||
server/DatabaseManager.cpp
|
||||
${PROTO_SRCS} ${PROTO_HDRS}
|
||||
)
|
||||
|
||||
target_include_directories(Server PRIVATE include)
|
||||
target_link_libraries(Server PRIVATE Boost::system OpenSSL::SSL OpenSSL::Crypto)
|
||||
target_include_directories(Server PRIVATE include ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(Server PRIVATE
|
||||
Boost::system
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
protobuf::libprotobuf
|
||||
)
|
||||
|
||||
add_executable(Client
|
||||
client/Client.cpp
|
||||
client/main.cpp
|
||||
${PROTO_SRCS} ${PROTO_HDRS}
|
||||
)
|
||||
target_include_directories(Client PRIVATE include ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(Client PRIVATE
|
||||
Boost::system
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
protobuf::libprotobuf
|
||||
)
|
||||
target_include_directories(Client PRIVATE include)
|
||||
target_link_libraries(Client PRIVATE Boost::system OpenSSL::SSL OpenSSL::Crypto)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue