xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package("qmsetup")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/stdware/qmsetup")
  4. set_description("CMake Modules and Basic Libraries for C/C++ projects.")
  5. set_license("MIT")
  6. add_urls("https://github.com/stdware/qmsetup.git", {submodules = false})
  7. add_versions("2024.09.02", "1331bf738dc6864f9ff927096f4dec8adc1c209f")
  8. add_deps("cmake")
  9. if is_plat("linux", "bsd", "macosx") then
  10. add_deps("patchelf")
  11. end
  12. add_deps("syscmdline")
  13. on_install(function (package)
  14. local configs = {}
  15. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
  16. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  17. table.insert(configs, "-DQMSETUP_STATIC_RUNTIME=" .. (package:has_runtime("MT", "MTd") and "ON" or "OFF"))
  18. os.mkdir(path.join(package:buildir(), "src/corecmd/pdb"))
  19. import("package.tools.cmake").install(package, configs)
  20. package:addenv("PATH", "bin")
  21. end)
  22. on_test(function (package)
  23. assert(package:has_cxxincludes("qmsetup/qmsetup_global.h"))
  24. end)