xmake.lua 700 B

12345678910111213141516171819202122232425262728
  1. -- Views 模块配置
  2. -- 此文件被主项目通过 includes("views") 引入
  3. -- Views 库
  4. target("views_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("user32", "gdi32", "ole32", "shell32")
  19. add_syslinks("OpenGL32")
  20. end
  21. add_frameworks("QtCore", "QtGui", "QtWidgets", "QtNetwork", "QtMultimedia")
  22. target_end()