xmake.lua 613 B

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