xmake.lua 740 B

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