xmake.lua 696 B

1234567891011121314151617181920212223242526
  1. -- Network 模块配置
  2. -- 此文件被主项目通过 includes("network") 引入
  3. -- Network 库
  4. target("network_lib")
  5. set_kind("static")
  6. -- 所有源文件
  7. add_files("*.cpp")
  8. add_headerfiles("*.h")
  9. -- 包含目录
  10. add_includedirs(".", {public = true})
  11. add_includedirs("..", {public = true})
  12. -- Qt 配置
  13. add_rules("qt.shared")
  14. -- Qt MOC 处理
  15. add_files("*.h", {rules = "qt.moc"})
  16. -- Windows 特定链接库
  17. if is_plat("windows") then
  18. add_syslinks("ws2_32", "wininet", "user32", "gdi32", "ole32")
  19. end
  20. add_frameworks("QtCore", "QtGui", "QtWidgets", "QtNetwork", "QtMultimedia", "QtWebSockets")
  21. target_end()