xmake.lua 627 B

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