package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
1.1 KiB
25 lines
1.1 KiB
1 year ago
|
package("pahomqttc")
|
||
|
set_homepage("https://github.com/eclipse/paho.mqtt.c")
|
||
|
set_description("Eclipse Paho MQTT C Client Library")
|
||
|
set_license("MIT")
|
||
|
|
||
|
add_urls("https://github.com/eclipse/paho.mqtt.c/archive/refs/tags/$(version).zip",
|
||
|
"https://github.com/eclipse/paho.mqtt.c.git")
|
||
|
|
||
|
add_versions("v1.3.13", "5ba7c7ab7ebb1499938fa2e358e6c1f9a926b270f2bf082acf89d59b4771a132")
|
||
|
|
||
|
add_deps("cmake")
|
||
|
|
||
|
on_install("windows", "linux", "macosx", function (package)
|
||
|
local configs = {"-DPAHO_BUILD_SAMPLES=FALSE",
|
||
|
"-DPAHO_WITH_SSL=FALSE",
|
||
|
"-DPAHO_BUILD_DOCUMENTATION=FALSE"}
|
||
|
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
||
|
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
|
||
|
import("package.tools.cmake").install(package, configs)
|
||
|
end)
|
||
|
|
||
|
on_test(function (package)
|
||
|
assert(package:has_cfuncs("MQTTClient_connect", {includes = "MQTTClient.h"}))
|
||
|
end)
|
||
|
package_end()
|