• 大小: 602KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-21
  • 语言: 其他
  • 标签: MQTT  源码  

资源简介

paho.mqtt.c-1.3.1 源码

资源截图

代码片段和文件信息

from conans import ConanFile CMake tools


class PahocConan(ConanFile):
    name = “paho.mqtt.c“
    version = “1.3.1“
    license = “Eclipse Public License - v 1.0“
    url = “https://github.com/eclipse/paho.mqtt.c“
    description = “““The Eclipse Paho project provides open-source client implementations of MQTT
and MQTT-SN messaging protocols aimed at new existing and emerging applications for the Internet
of Things (IoT)“““
    settings = “os“ “compiler“ “build_type“ “arch“
    options = {“shared“: [True False] “SSL“: [True False] “asynchronous“: [True False]}
    default_options = “shared=False“ “SSL=False“ “asynchronous=False“
    generators = “cmake“
    exports_sources = “*“

    def requirements(self):
        if self.options.SSL:
            self.requires(“OpenSSL/1.0.2n@conan/stable“)

    def build(self):
        tools.replace_in_file(“CMakeLists.txt“ “PROJECT(\“paho\“ C)“ ‘‘‘PROJECT(“paho“ C)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()‘‘‘)
        tools.replace_in_file(“CMakeLists.txt“ “ADD_SUBDIRECTORY(test)“ ““) #  Disable tests
        tools.replace_in_file(“CMakeLists.txt“
                              “ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD)“
                              “ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN)“) #  Allow other runtimes
        cmake = CMake(self)
        cmake.definitions[“PAHO_BUILD_DOCUMENTATION“] = False
        cmake.definitions[“PAHO_BUILD_SAMPLES“] = False
        cmake.definitions[“PAHO_BUILD_DEB_PACKAGE“] = False
        cmake.definitions[“PAHO_BUILD_STATIC“] = not self.options.shared
        cmake.definitions[“PAHO_WITH_SSL“] = self.options.SSL
        cmake.configure()
        cmake.build()

    def package(self):
        self.copy(“*e*l-v10“ dst=“licenses“)
        self.copy(“*.h“ dst=“include“ src=“src“)
        self.copy(“*paho*.dll“ dst=“bin“ keep_path=False)
        self.copy(“*paho*.dylib“ dst=“lib“ keep_path=False)
        self.copy(“*paho*.so*“ dst=“lib“ keep_path=False)
        self.copy(“*paho*.a“ dst=“lib“ keep_path=False)
        self.copy(“*paho*.lib“ dst=“lib“ keep_path=False)

    def package_info(self):
        self.cpp_info.libs = []

        if self.options.shared and self:
            if self.options.asynchronous:
                if self.options.SSL:
                    self.cpp_info.libs.append(“paho-mqtt3as“)
                else:
                    self.cpp_info.libs.append(“paho-mqtt3a“)
            else:
                if self.options.SSL:
                    self.cpp_info.libs.append(“paho-mqtt3cs“)
                else:
                    self.cpp_info.libs.append(“paho-mqtt3c“)
        else:
            if self.options.asynchronous:
                if self.options.SSL:
                    self.cpp_info.libs.append(“paho-mqtt3as-static“)
                else:
                    self.cpp_info.libs.append(“paho-mqtt3a-static“)
            else:
                

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-08-06 22:24  paho.mqtt.c-1.3.1\
     文件       17617  2019-08-06 22:24  paho.mqtt.c-1.3.1\.cproject
     文件          51  2019-08-06 22:24  paho.mqtt.c-1.3.1\.gitignore
     文件         100  2019-08-06 22:24  paho.mqtt.c-1.3.1\.gitreview
     文件         985  2019-08-06 22:24  paho.mqtt.c-1.3.1\.project
     文件         302  2019-08-06 22:24  paho.mqtt.c-1.3.1\.pydevproject
     目录           0  2019-08-06 22:24  paho.mqtt.c-1.3.1\.settings\
     文件        4289  2019-08-06 22:24  paho.mqtt.c-1.3.1\.settings\org.eclipse.cdt.core.prefs
     文件        2432  2019-08-06 22:24  paho.mqtt.c-1.3.1\.travis.yml
     文件        3678  2019-08-06 22:24  paho.mqtt.c-1.3.1\CMakeLists.txt
     文件         116  2019-08-06 22:24  paho.mqtt.c-1.3.1\CODE_OF_CONDUCT.md
     文件        3612  2019-08-06 22:24  paho.mqtt.c-1.3.1\CONTRIBUTING.md
     文件         523  2019-08-06 22:24  paho.mqtt.c-1.3.1\LICENSE
     文件       14420  2019-08-06 22:24  paho.mqtt.c-1.3.1\Makefile
     文件         584  2019-08-06 22:24  paho.mqtt.c-1.3.1\PULL_REQUEST_TEMPLATE.md
     文件        9361  2019-08-06 22:24  paho.mqtt.c-1.3.1\README.md
     文件        1605  2019-08-06 22:24  paho.mqtt.c-1.3.1\about.html
     目录           0  2019-08-06 22:24  paho.mqtt.c-1.3.1\android\
     文件        5647  2019-08-06 22:24  paho.mqtt.c-1.3.1\android\Android.mk
     文件        2601  2019-08-06 22:24  paho.mqtt.c-1.3.1\appveyor.yml
     文件       10426  2019-08-06 22:24  paho.mqtt.c-1.3.1\build.xml
     文件         358  2019-08-06 22:24  paho.mqtt.c-1.3.1\cbuild.bat
     目录           0  2019-08-06 22:24  paho.mqtt.c-1.3.1\cmake\
     文件        3365  2019-08-06 22:24  paho.mqtt.c-1.3.1\cmake\CPackDebConfig.cmake.in
     文件         253  2019-08-06 22:24  paho.mqtt.c-1.3.1\cmake\toolchain.linux-arm11.cmake
     文件         601  2019-08-06 22:24  paho.mqtt.c-1.3.1\cmake\toolchain.win32.cmake
     文件         605  2019-08-06 22:24  paho.mqtt.c-1.3.1\cmake\toolchain.win64.cmake
     文件        3987  2019-08-06 22:24  paho.mqtt.c-1.3.1\conanfile.py
     目录           0  2019-08-06 22:24  paho.mqtt.c-1.3.1\debian\
     文件         589  2019-08-06 22:24  paho.mqtt.c-1.3.1\debian\CMakeLists.txt
     文件        3248  2019-08-06 22:24  paho.mqtt.c-1.3.1\deploy_rsa.enc
............此处省略213个文件信息

评论

共有 条评论