qmsetup: fix library kind (#5192)

pull/5199/head
star9029 7 months ago committed by GitHub
parent 0dd317806b
commit cc53d6fdb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      packages/q/qmsetup/xmake.lua
  2. 34
      packages/s/syscmdline/xmake.lua

@ -1,17 +1,25 @@
package("qmsetup")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/stdware/qmsetup")
set_description("CMake Modules and Basic Libraries for C/C++ projects.")
set_license("MIT")
add_urls("https://github.com/stdware/qmsetup.git")
add_versions("2024.04.23", "0b95afa778b99d9e9de772006555309b74ed32f4")
add_urls("https://github.com/stdware/qmsetup.git", {submodules = false})
add_versions("2024.09.02", "1331bf738dc6864f9ff927096f4dec8adc1c209f")
add_deps("cmake")
if is_plat("linux", "bsd", "macosx") then
add_deps("patchelf")
end
add_deps("syscmdline")
on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DQMSETUP_STATIC_RUNTIME=" .. (package:has_runtime("MT", "MTd") and "ON" or "OFF"))
os.mkdir(path.join(package:buildir(), "src/corecmd/pdb"))
import("package.tools.cmake").install(package, configs)
package:addenv("PATH", "bin")
end)

@ -0,0 +1,34 @@
package("syscmdline")
set_homepage("https://github.com/SineStriker/syscmdline")
set_description("C++ Advanced Command Line Parser")
set_license("MIT")
add_urls("https://github.com/SineStriker/syscmdline.git")
add_versions("2024.03.27", "70e18ba18056bff1bebab924dde73dbbf04d46f9")
add_deps("cmake")
if is_plat("windows", "mingw") then
add_syslinks("shell32")
end
on_install(function (package)
if not package:config("shared") then
package:add("defines", "SYSCMDLINE_STATIC")
end
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DSYSCMDLINE_BUILD_STATIC=" .. (package:config("shared") and "OFF" or "ON"))
import("package.tools.cmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
namespace SCL = SysCmdLine;
void test() {
SCL::Command cmd("mv", "move files to directory");
}
]]}, {configs = {languages = "c++17"}, includes = "syscmdline/parser.h"}))
end)
Loading…
Cancel
Save