xmake.lua 709 B

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