-- Network 模块配置
-- 此文件被主项目通过 includes("network") 引入

-- Network 库
target("network_lib")
    add_rules("qt.static")
    if is_plat("windows") then
        add_defines("UNICODE", "_UNICODE")
    end
    
    -- 所有源文件
    add_files("*.cpp")
    add_headerfiles("*.h")
    
    -- 包含目录
    add_includedirs(".", {public = true})
    add_includedirs("..", {public = true})
    -- Qt 配置
    
    
    -- Qt MOC 处理
    add_files("*.h", {rules = "qt.moc"})
    
    -- Windows 特定链接库
    if is_plat("windows") then
        add_syslinks("ws2_32", "wininet", "user32", "gdi32", "ole32")
    end
    add_frameworks("QtConcurrent", {public = true})
    add_frameworks("QtCore", "QtGui", "QtWidgets", "QtNetwork", "QtMultimedia", "QtWebSockets", {public = true})
target_end()
