xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. add_rules("mode.debug", "mode.release")
  2. set_languages("c++17")
  3. if is_plat("mingw") then
  4. add_requires("sfml", {configs = {graphics = true, shared = true}})
  5. else
  6. add_requires("sfml", {configs = {graphics = true}})
  7. end
  8. add_requires("opengl")
  9. if is_plat("linux", "bsd", "cross") then
  10. add_requires("libx11")
  11. end
  12. option("font", {default = true})
  13. target("sfgui")
  14. set_kind("$(kind)")
  15. if is_plat("windows") then
  16. add_defines("WIN32_LEAN_AND_MEAN", "NOMINMAX")
  17. end
  18. if is_plat("windows", "mingw") and is_kind("shared") then
  19. add_defines("SFGUI_EXPORTS")
  20. end
  21. if is_kind("static") then
  22. add_defines("SFGUI_STATIC")
  23. end
  24. add_packages("sfml", "opengl")
  25. if is_plat("linux", "bsd", "cross") then
  26. add_packages("libx11")
  27. end
  28. if is_plat("macosx", "iphoneos") then
  29. add_frameworks("CoreFoundation", "Foundation")
  30. end
  31. add_files("src/**.cpp")
  32. if not has_config("font") then
  33. remove_files("src/SFGUI/DejaVuSansFont.cpp")
  34. else
  35. add_defines("SFGUI_INCLUDE_FONT")
  36. end
  37. add_includedirs("src", "include", "extlibs/libELL/include")
  38. add_headerfiles("include/(SFGUI/**.hpp)", "include/(SFGUI/**.inl)")