xmake.lua 695 B

1234567891011121314151617181920212223242526272829
  1. -- Util 模块配置
  2. -- 此文件被主项目通过 includes("util") 引入
  3. -- Util 库
  4. target("util_lib")
  5. set_kind("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. -- Qt 配置
  15. add_qt_config()
  16. -- Qt MOC 处理
  17. add_files("*.h", {rules = "qt.moc"})
  18. -- Windows 特定链接库
  19. if is_plat("windows") then
  20. add_syslinks("user32", "gdi32", "ole32", "shell32")
  21. end
  22. add_frameworks("QtCore", "QtGui", "QtWidgets", "QtNetwork", "QtMultimedia")
  23. target_end()