xmake.lua 829 B

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