#=================================================================
# file:         server.cmake
# Copyright (c) 2020-2021 moe-org 保留所有权利
#=================================================================



add_executable(${U_SERVER_EXECUTABLE} 
	"${U_SERVER_SOURCE_CODE_DIR}/server.cpp"
	"${U_SERVER_SOURCE_CODE_DIR}/net/net-thread.cpp"
	"${U_SERVER_SOURCE_CODE_DIR}/net/server.cpp"
)

# 链接核心
target_link_libraries(${U_SERVER_EXECUTABLE} PUBLIC ${U_CORE_LIBRARY})

# 引用核心和第三方库头文件
target_include_directories(${U_SERVER_EXECUTABLE} PUBLIC ${U_CORE_SOURCE_CODE_DIR})
target_include_directories(${U_SERVER_EXECUTABLE} PUBLIC ${U_LIBRARY_INCLUDE_DIR})

# 添加测试
add_executable(
	${U_SERVER_EXECUTABLE_TEST}
	"${U_CORE_TEST_CODE_DIR}/init-test.cpp"
)
